You need to sign in to do that
Don't have an account?

Batch Email
Hi
Through batch apex updating records
What ever mail id field present in lead object to those mail ids email should be sent through bacth apex how is it achieved
Thanks in advance
Regards
Prince
Through batch apex updating records
What ever mail id field present in lead object to those mail ids email should be sent through bacth apex how is it achieved
Thanks in advance
Regards
Prince
Email this filed will have lead email id, please use Email in your code
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh
Thanks for your quick reply
can you be more clear please i did nto get you
regards
Teja
The code snippet mentioned in https://salesforceglobe4u.blogspot.com/2017/06/how-to-send-email-through-apex-in.html should help you get started. It is in the context of fetching email id from contact object. You will need to customize this as per your requirement.
If this information helps, please mark the answer as best. Thank you
Greetings!
1. Please Create a class that implements an interface Database.batchable.
2. Overload 3 methods - start(), execute and finish().
3. Create an Instance variable of List<String>.
3. In the start method, query those records of lead which having email does not equal to NULL.
4. In execute, add those emails to an instance variable.
5. In the finish, send mail to those email IDs which are present in instance variable using SingleEmailMessage Class.
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi