smtp mail

i am using  System.Web.Mail.SmtpMail.Send() method to send emails. I get undeliverable notification email  notification when i put in invalid domain name but i don't get any kind of notification if the username of the email is invalid or doesn't exist. Is there a way to to get notified if the username in the email doesn't exists?
Who is Participating?
sshah254Connect With a Mentor Commented:
Domain Names can be checked against the DNS servers - to check if a record exists or not.

Usernames cannot be checked (there is no IETF standard for that).

Also, it depends on the recipient mail server ... some of them let you know if the user is available (most do not, to avoid SPAM).

Easwaran ParamasivamCommented:
You can set Reply-To mailid. Where all undeliverialble maill will be sent notification there!!

MailMessage mail = new MailMessage();
mail.To = "";
mail.From = "";
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body.";
mail.Headers.Add( "Reply-To", "" );
SmtpMail.SmtpServer = "localhost";  //your real server goes here
SmtpMail.Send( mail );

For more information see the thread:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.