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?
singsunnAsked:
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).

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

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

For more information see the thread: http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_27306969.html
0
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.