Open matteoventuri7 opened 9 years ago
I had the same issue, problem is that Razor Engine parser Html encodes the string, so your email address would end up as Mike Jones <mike@jones.com>
which is invalid email address. I was able to fix it by implementing my own IEmailParser
. Basically copy the EmailParser
and change the following in AssignEmailHeaderToMailMessage
case "to":
message.To.Add(value);
break;
to
case "to":
value = HttpUtility.HtmlDecode(value);
message.To.Add(value);
break;
Hi, in my project (MVC5 and Postal.Mvc5 1.2.0) i try to send mail with sender e-mail like "Mike Jones <mike@jones.com>" (without quotes) and when e-mail start I receive this error: The message header contains an invalid character ';'.
Thanks.