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]

Published Thursday, January 03, 2008 11:38 PM by Ken Cox [MVP]

Comments

# A System.Net.Mail.MailMessage Mystery Solved - WebLog of Ken Cox

Pingback from  A System.Net.Mail.MailMessage Mystery Solved - WebLog of Ken Cox

Leave a Comment

(required) 
(required) 
(optional)
(required)