I need to parse html code into string, because i'm later using it as my body content of email message:
Is there a way to parse html code like this:
<div class="alert alert-success" role="alert">
<h4 class="alert-heading">Well done!</h4>
<p>You have successfully subscribed!</p>
<hr>
<p class="mb-0">We will be sending you newsletter on weekly basis.</p>
</div>
into string in a clean way, without doing it like this:
string body = @"<div class=""alert alert-success"" role=""alert"">" + "</div>"
so i could pass it to mail like this:
MailMessage mailMessage = new MailMessage();
mailMessage.Body = body;
instead of having a whole series of html code inside string there.
Is there maybe any other "way" to make "design" for email messages?
PS: i also do not want to load html from external file
I would like to use html code to have a decent design for subscribing to newsletter message on email.
Thank you!