I am using System.Net.Mail/ SmtpClient
to send verification Email in MVC4. The primary email address format check is performed by a REGEX
. I am successful in sending messages using Gmail SMTP server
.
However I would like to know if the email address that I am sending message to Exists and that my email is received as the user will not be approved without verification link. I tried non existent email address and no warning/exception was generated.
Can anyone point out any method to generate exception if the sending fails due to non-existence of the email address. Or can you suggest what status codes to look out for?