Dear Friends,
Pl send the mail sending coding in c#.i used the following coding but its getting error as below,so send any good working coding to send the email,
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 Error:
Line 67:
Line 68: SmtpClient smtpClient = new SmtpClient();
Line 69: MailMessage message = new MailMessage();
Line 70:
Line 71: //try
Source File: c:\inetpub\vhosts\cegonsoftfaq.com\httpdocs\ContactUs.aspx.cs Line: 69
Stack Trace:
[FormatException: The specified string is not in the form required for an e-mail address.]
System.Net.Mail.MailAddressParser.ParseAddress(String data, Boolean expectMultipleAddresses, Int32& index) +1252418
System.Net.Mail.MailAddressParser.ParseAddress(String data) +23
System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding) +245
System.Net.Mail.MailMessage..ctor() +133
Feedback.Button1_Click(Object sender, EventArgs e) in c:\inetpub\vhosts\cegonsoftfaq.com\httpdocs\ContactUs.aspx.cs:69
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563