A System.Net.Mail.MailMessage Mystery Solved

If you get an error such as "The specified string is not in the form required for an e-mail address." when trying to initialize a System.Net.Mail.MailMessage object, look in the web.config file for errors in the mailSettings and smtp sections.

For more detail on how I discovered the solution (but a little late), check out my article at http://www.kencox.ca/ShowArticle.aspx?ID=21 .

Ken

MVP [ASP.NET]

No Comments