I have an e-mail template which is just a plain, static HTML page.
I need to get that page into the Body of a MailMessage
.
Normally what I would do is just create a StringBuilder
and append the lines over and over. But it's kind of a long page, and I don't want to go through replacing the quotes with single quotes etc..
So is there a way to just pull in the contents of an html page into a string? Such as:
emailMessage.IsBodyHtml = true;
emailMessage.Subject = "Test Subject";
emailMessage.Body = GetContentsFrom("emailtemplate.html");
Thanks!