+ Start a Discussion
NarenKNarenK 

If Email sent to invalid email what happens?

Hi All,

 

I am sending an email from my apex code using Messaging.sendEmail(). Everything is working fine. But I have a onq uestion here like, what happens If I send an email to invalid email addresss(email address doen't exist). Will SF will notify me about this failure?

 

Please let me know.

 

Regd,

Naren

Best Answer chosen by Admin (Salesforce Developers) 
TheIntegratorTheIntegrator

Yes, failure notification is sent. You should also look at Bounce Management, which alerts the user when they are sending mails to leads or contacts with invalid email address.

All Answers

TheIntegratorTheIntegrator

Yes, failure notification is sent. You should also look at Bounce Management, which alerts the user when they are sending mails to leads or contacts with invalid email address.

This was selected as the best answer
NarenKNarenK

I tested it. But I didn't recieved any failure notofication. You mean in case of failre will it send a email to me saying "hey for this email id sending mail is failed because this is a invalid mail" ?

 

Regd,

Naren

TheIntegratorTheIntegrator

See if "Return bounced emails to sender" is checked in Administration Setup->Email Administration->Deliverability .

NarenKNarenK

In My org this option is already checked. But I am not getting any bounced messages in my inbox.

TheIntegratorTheIntegrator

ok, sorry, not sure why it would not work for you. Maybe someone else here can explain it or you could open a case to have it answered by salesforce. But this is what the feature is for.

NarenKNarenK

Thanks for your help Bunty. I am not using any templates while sending the email I am just sending an email to a some random email address (it will not present as contacts/Leads in SF) with some body as "testmail.". Do you think because of this I am not getting bounced mails?

 

Agains thanks for trying to answer my question here.

TheIntegratorTheIntegrator

As far as I know, that should not affect the outcome, HTML or Text, if the mail bounces, you should get a mail from Mail Delivery System [mailer-daemon@salesforce.com]

NarenKNarenK

It worked. I got a mail from mailer-daemon@salesforce.com. But it almost took 2 hours to bounce the mail and send it to my Inbox. Looks like something is causing this long delay.

 

Thank You!.