smsohan/MvcMailer — Issue #28: Geting encoding problem only when I use linkedResources
Author: Medes
Created: 2011-10-08 21:52:25+00:00
State: open

Hi,
I have used your mvcmailer application which is fantastic, in my "contact us" form. the only problem is when I use linkedResources in populateBody method, the email will be unreadable it contains strange characters. when i remove linkedResources in the method I get the email as it is.
I need to use dictionary as LinkedResources in populateBody method to show our logo. any advice ? thank you.
here is the code
mailMessage.To.Add("info@blah.com");
ViewData = new ViewDataDictionary(c);
mailMessage.BodyEncoding = System.Text.Encoding.UTF8;

PopulateBody(mailMessage, viewName: "ContactUs", linkedResources: resources);