Click here to Skip to main content
15,880,608 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The specified string is not in the form required for an e-mail address.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: The specified string is not in the form required for an e-mail address.


Source of error:
C#
SmtpClient smtpclient = new SmtpClient();
MailMessage message = new MailMessage(fr,to,sub,body);
//MailAddress fromaddress = new MailAddress();



Please send reason for this error and solution for this error. Thanks in advance
Posted
Updated 24-Jan-11 19:38pm
v2
Comments
Indivara 25-Jan-11 1:35am    
So is it or isn't it (in the form required for an e-mail address)? Did you check?
Indivara 25-Jan-11 1:39am    
Fixed formatting. (Why on earth did you specify lang="msil"? Oh never mind...)

See here[^]. It may help.
 
Share this answer
 
The from (fr) parameter value you are supplying is not in correct format. It has to be a valid email address.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900