How to show one of the recipient mail id is invalid is wrong [Resolved]

Posted by Sankar20092010 under VB.NET on 11/28/2013 | Points: 10 | Views : 3643 | Status : [Member] | Replies : 3
Hi...

While using SMTP Email method for sending mails, how to know which recipient
email is is invalid. Suppose i have multiple email ids. Kindly reply as soon as possible.

Thanks and Regards

Sankar
Cochin




Responses

Posted by: vishalneeraj-24503 on: 11/28/2013 [Member] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
Alternatively you can check below links for valid/invalid mail-ids:-
http://developergeeks.com/article/271/how-to-verify-the-email-address-is-valid-in-aspnet
http://www.dotnetheaven.com/article/check-the-valid-email-and-invalid-email-address-in-vb.net
http://www.daniweb.com/web-development/php/threads/141944/check-if-email-address-is-correct-without-sending-email

Hope this helps you.

Sankar20092010, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: vishalneeraj-24503 on: 11/28/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Hi, you can check like below:-
catch (SmtpFailedRecipientsException ex)
{
for (int i = 0; i < ex.InnerExceptions.Length; i++)
{
SmtpStatusCode status = ex.InnerExceptions[i].StatusCode;
if (status == SmtpStatusCode.MailboxBusy ||status == SmtpStatusCode.MailboxUnavailable)
{
// Console.WriteLine("Delivery failed - retrying in 5 seconds.");
System.Threading.Thread.Sleep(5000);
mailclient.Send(mail);
}
else
{
// Console.WriteLine("Failed to deliver message to {0}", ex.InnerExceptions[i].FailedRecipient);
throw ex;
}
}
}


Sankar20092010, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: t5j9033387989 on: 11/28/2013 [Member] Starter | Points: 25

Up
0
Down
you can check this method also by send mail to recipient mail id,and see that mail is deliver or not,
or check this link also in it solution is given,

dotnettutroialforu.blogspot.in/2013/06/check-emailid-already-exists-or-not-in.html

i hope this will help you,

Thanks&Regards,
Ketan Italiya

mark this answer if it will really help you,

Thanks&Regards
ketan

Sankar20092010, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response