You need to sign in to do that
Don't have an account?
AnonTestQuest
How to send out an email to separate addresses in a batch.
I need to send an email out to whoever fits the criteria of my sched batch. The batch runs nightly. So I will need it to email different people each time. Also, I need to include a link to the record they should be adjusting and the record link will be specific to them. What's the best way to do this in my batch?
In the finish logic of the batch you can implement this block of code this is for sending out csv's :
As per your requirement you can query new email address each time the batch executes and put it in a string and pass in place of 'hardcodedemail@gmail'
I think this will solve your problem of sending email each time to a new person.