Message=The specified string is not in the form required for an e-mail address.
System.FormatException was unhandled by user code
HResult=-2146233033
Message=The specified string is not in the form required for an e-mail address.
Source=System
StackTrace:
at System.Net.Mail.MailAddressParser.ReadCfwsAndThrowIfIncomplete(String data, Int32 index)
at System.Net.Mail.MailAddressParser.ParseDomain(String data, Int32& index)
at System.Net.Mail.MailAddressParser.ParseAddress(String data, Boolean expectMultipleAddresses, Int32& index)
at System.Net.Mail.MailAddressParser.ParseAddress(String data)
at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)
at System.Net.Mail.MailAddress..ctor(String address)
at Postal.EmailParser.AssignEmailHeaderToMailMessage(String key, String value, MailMessage message)
at Postal.EmailParser.ProcessHeader(String key, String value, MailMessage message, Email email)
at Postal.EmailParser.<>cDisplayClass2.b0(String key, String value)
at Postal.ParserUtils.ParseHeaders(TextReader reader, Action`2 useKeyAndValue)
at Postal.EmailParser.InitializeMailMessage(MailMessage message, String emailViewOutput, Email email)
at Postal.EmailParser.Parse(String emailViewOutput, Email email)
at Postal.EmailService.CreateMailMessage(Email email)
at Postal.EmailService.Send(Email email)
at Postal.Email.Send()
More information required.
Are the From and To email addresses both set in the view? Are they valid email addresses? Can you post the cshtml file here?
Hi, When i try send email i having
Message=The specified string is not in the form required for an e-mail address.
System.FormatException was unhandled by user code HResult=-2146233033 Message=The specified string is not in the form required for an e-mail address. Source=System StackTrace: at System.Net.Mail.MailAddressParser.ReadCfwsAndThrowIfIncomplete(String data, Int32 index) at System.Net.Mail.MailAddressParser.ParseDomain(String data, Int32& index) at System.Net.Mail.MailAddressParser.ParseAddress(String data, Boolean expectMultipleAddresses, Int32& index) at System.Net.Mail.MailAddressParser.ParseAddress(String data) at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding) at System.Net.Mail.MailAddress..ctor(String address) at Postal.EmailParser.AssignEmailHeaderToMailMessage(String key, String value, MailMessage message) at Postal.EmailParser.ProcessHeader(String key, String value, MailMessage message, Email email) at Postal.EmailParser.<>cDisplayClass2.b 0(String key, String value)
at Postal.ParserUtils.ParseHeaders(TextReader reader, Action`2 useKeyAndValue)
at Postal.EmailParser.InitializeMailMessage(MailMessage message, String emailViewOutput, Email email)
at Postal.EmailParser.Parse(String emailViewOutput, Email email)
at Postal.EmailService.CreateMailMessage(Email email)
at Postal.EmailService.Send(Email email)
at Postal.Email.Send()