on 2016 Aug 19 10:17 PM
Follow the below steps:
(1) Extend the DefaultEmailGenerationService and override createEmailMessage() method.
(2) In createEmailMessage() method, create toEmailList like below:
List<EmailAddressModel> toEmailList = new ArrayList<EmailAddressModel> ();
final EmailAddressModel email1 =
emailService.getOrCreateEmailAddressForEmail("email1@gmail.com", "DISPLAY_NAME");
final EmailAddressModel email2 =
emailService.getOrCreateEmailAddressForEmail("email2@gmail.com", "DISPLAY_NAME");
toEmailList.add(email1);
toEmailList.add(email2);
(3) Now,call createEmailMessage() method of DefaultEmailService class by passing "toEmailList" as a parameter along with others parameter.
return getEmailService().createEmailMessage(toEmails, new ArrayList(), new ArrayList<EmailAddressModel>(), fromAddress, emailContext.getFromEmail(), emailSubject, emailBody, null);
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil, You can create the List of EmailAddressModel and pass that to createEmailMessage() method of DefaultEmailService and you need to set the emails in the EmailAddressModel and pass that as ccAddresses in the above method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
32 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.