Good Day.
I want to send an email from my code file in ASP.NET. I want to apply styling to my html...How do I do it?
Here is the html part:
var Message = string.Format("<html><head></head><body><div style=""this does not work!!"">{0}<br/>{1}<br />{2}<br />{3}<br />{4}<br />{5}</body></html>", emaildetail.Name, emaildetail.Surname, emaildetail.CardProvider, emaildetail.CardType, emaildetail.CardNo, emaildetail.SuspendGuid);
SendEmail("my email address", "Suspended Message", Message, true, null, true, 587);
I tried using double quotes, but it does not work.
How can I do this?
Thank you
$emaildetail.Surname
..."` No need for those nasty placeholders. Granted building up the HTML this way is horrible - far better to use a templating engine.