Link to home
Start Free TrialLog in
Avatar of singsunn
singsunn

asked on

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?
ASKER CERTIFIED SOLUTION
Avatar of sshah254
sshah254

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Easwaran Paramasivam
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: https://www.experts-exchange.com/questions/27306969/Mass-Mail.html