Monday, August 2, 2010

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




Please visit my new Web Site WWW.Codedisplay.com



This error may occur when you are working with .net 1.1 means when using the namespace Sytstem.Web.Mail. If we want to send email to multiple or more than one person usually we use like:

To=aaaaaaa@gmail.com;bbbbbbbb@gmail.com;ccccccccc@gmail.com;

This will work in the namespace Sytstem.Web.Mail because here we use semicolon to split or separate email ID's.

But the ERROR: "Specified string is not in the form required for an e-mail address" will appear when we use semicolon as a separator in .net 2.0. Because the namespace System.Net.Mail in .net 2.0 framework will use comma as the email separator instead of semicolon. So we will use like below:

To="aaaaaaa@gmail.com,bbbbbbbb@gmail.com,ccccccccc@gmail.com";

Hope now your problem has been resolved.

0 comments:

Want to say something?
I WOULD BE DELIGHTED TO HEAR FROM YOU

Want To Search More?
Google Search on Internet
Subscribe RSS Subscribe RSS
Article Categories
  • Asp.net
  • Gridview
  • Javascript
  • AJAX
  • Sql server
  • XML
  • CSS
  • Free Web Site Templates
  • Free Desktop Wallpapers
  • TopOfBlogs
     
    Free ASP.NET articles,C#.NET,VB.NET tutorials and Examples,Ajax,SQL Server,Javascript,Jquery,XML,GridView Articles and code examples -- by Shawpnendu Bikash