Skip to main content

By defining the Single Message as below, you can send only one email at a time. If you want to send 10 emails, it is 10 instances of the single message.

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

Change your definition as follows.

List< Messaging.SingleEmailMessage > mail = new List< Messaging.SingleEmailMessage >();

List< Messaging.SingleEmailMessage > mail = new List< Messaging.SingleEmailMessage >();

By doing so, you can add 100 members to the list. All the 100 emails are sent with the method Messaging.SendEmail(mail);

By defining the Single Message as below, you can send only one email at a time. If you want to send 10 emails, it is 10 instances of the single message.

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

Change your definition as follows.

List< Messaging.SingleEmailMessage > mail = new List< Messaging.SingleEmailMessage >();

By doing so, you can add 100 members to the list. All the 100 emails are sent with the method Messaging.SendEmail(mail);

By defining the Single Message as below, you can send only one email at a time. If you want to send 10 emails, it is 10 instances of the single message.

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

Change your definition as follows.

List< Messaging.SingleEmailMessage > mail = new List< Messaging.SingleEmailMessage >();

By doing so, you can add 100 members to the list. All the 100 emails are sent with the method Messaging.SendEmail(mail);

Source Link

By defining the Single Message as below, you can send only one email at a time. If you want to send 10 emails, it is 10 instances of the single message.

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

Change your definition as follows.

List< Messaging.SingleEmailMessage > mail = new List< Messaging.SingleEmailMessage >();

By doing so, you can add 100 members to the list. All the 100 emails are sent with the method Messaging.SendEmail(mail);