[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

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?
0
singsunn
Asked:
singsunn
1 Solution
 
sshah254Commented:
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

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now