Specified string is not in the form required for an e-mail address

Posted by Venkat | Labels:

This error cause while you are working with .net1.1.1 ie" Sytstem.Web.Mail; if we send the email to multiple person we use like this

string toemail = "xxxxx@yahoo.com;yyyyyy@gmail.com;zzzzzz@hotmail.com;";

so this works there because we used semicolon to separate the emailID

But in .net 2.0 System.Net.Mail

if we use the same way (ie: using semicolon to differentiate the emailID) it will cause to give this error.

"Specified string is not in the form required for an e-mail address"

so the modified string

string toemail = "xxxxx@yahoo.com,yyyyyy@gmail.com,zzzzzz@hotmail.com";

0 comments:

Post a Comment

Thanks for the Comments.

PayOffers.in