I’m trying to insert a HTML formatted text at the end of the just before the tag.
So, while this works (insert a whole new text) :
String sHtml;
sHtml = "<HTML>\n" +
"<HEAD>\n" +
"<TITLE>Sample GIF</TITLE>\n" +
"</HEAD>\n" +
"<BODY><P>\n" +
"<h1><Font Color=Green>Inline graphics</Font></h1></P>\n" +
"</BODY>\n" +
"</HTML>";
mail.HTMLBody = sHtml;
This fails when i try to insert at the end of body:
String sHtml;
sHtml = "<P><h1><Font Color=Green>Inline graphics</Font></h1></P>\n</BODY>\n";
mail.HTMLBody.Replace("</BODY>", sHtml);
Please help !
You should change the last line into: