You need to sign in to do that
Don't have an account?
Abhishek Mahajan
SendEmail method Email bounce issue
Hi,
I am sending an email to a couple of contacts and got follwoing error,
System.EmailException: SendEmail failed. First exception on row 0; first error: EMAIL_ADDRESS_BOUNCED, The target object email address is currently marked as bounced.
Following is my apex code:
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
mail.setToAddresses(sendTo);
mail.setTemplateId(templateId.Id);
mail.setTargetObjectId(con.id);
mail.saveAsActivity = false;
mail.setWhatId(a.Id);
mails.add(mail);
Messaging.sendEmail(mails);
where sendTo is a list of string containing all email address.
Just wanted to know, will the contacts other than the one for which above error occured will receive email or SendEmail will fail for all contact in that list.
Thanks
I am sending an email to a couple of contacts and got follwoing error,
System.EmailException: SendEmail failed. First exception on row 0; first error: EMAIL_ADDRESS_BOUNCED, The target object email address is currently marked as bounced.
Following is my apex code:
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
mail.setToAddresses(sendTo);
mail.setTemplateId(templateId.Id);
mail.setTargetObjectId(con.id);
mail.saveAsActivity = false;
mail.setWhatId(a.Id);
mails.add(mail);
Messaging.sendEmail(mails);
where sendTo is a list of string containing all email address.
Just wanted to know, will the contacts other than the one for which above error occured will receive email or SendEmail will fail for all contact in that list.
Thanks
I believe that every email is treated independently, so they should be receiving those emails. Anyway you should try to send some emails to yourself while this bouncing contact is also in the recipients list.
Regards.