I have a html template that works when it is as is and sent to my Gmail. The css works and the positioning of elements is fine.
However, I when I load it into my application and do a replace string of certain text and resend it from my application, I noticed that in Gmail, not only is the css gone but all positioning is messed up.
This is my html email as is without replacing the text:
http://s000.tinyupload.com/?file_id=00874388724644178645
This is how I load the html and replace the text:
HtmlDocument document = new HtmlDocument();
document.Load(@message.Location);
content = document.DocumentNode.OuterHtml;
content = content.Replace("##" + innerItem + "##", line);
var eContent = new HtmlString(content);
I then proceed to sent the eContent string to my email via another function.
This is my html email after I replaced the text:
http://s000.tinyupload.com/?file_id=03908737686605061545
I am unsure of how else I can handle this email template properly.
I'm using the HTML Agility Pack to read the document in also.
EDIT:
The replaced email works with other email providers like the CPanel one but not Gmail