You need to sign in to do that
Don't have an account?
Ankit Agarwal 74
Send mass email
Hi all,
I want to send mass email but the mail have 5 different kind of mail instance so can you guys help me how to achieve this.
Below is the code that I have written in my code:
Messaging.sendEmail(new Messaging.MassEmailMessage[] { mail1,mail2,mail3,mail4,mail5 });
where
Messaging.MassEmailMessage mail1 = new Messaging.MassEmailMessage();
and so on...
In the current scenario if there is data in mail1 till mail5 then emails are send successfully but if any one of the instance is null, email is not send.
Can any one please help in correcting my code so that the emails are send successfully irrespective of null instance.
I want to send mass email but the mail have 5 different kind of mail instance so can you guys help me how to achieve this.
Below is the code that I have written in my code:
Messaging.sendEmail(new Messaging.MassEmailMessage[] { mail1,mail2,mail3,mail4,mail5 });
where
Messaging.MassEmailMessage mail1 = new Messaging.MassEmailMessage();
and so on...
In the current scenario if there is data in mail1 till mail5 then emails are send successfully but if any one of the instance is null, email is not send.
Can any one please help in correcting my code so that the emails are send successfully irrespective of null instance.