I am sending an email from ASP.NET using MailMessage and SmtpClient. I want to introduce some line breaks, but none of the following works:
- Add tags
sbBody.Append("<table width='100%'><tr><td></br></br>"); - Adding \ r \ n
sbBody.Append("<table width='100%'><tr><td>\r\n\r\n"); - Adding a new line to StringBuilder.
sbBody is the StringBuilder that I use at the end to set the body of MailMessage: mailMessage.Body = sbBody.ToString()
What am I missing here? I scan emails in Outlook and of course I set IsBodyHtml to true.
Thank you for your time.
The EDIT: . Solved, it was a syntax error, </br>instead<br/>
source
share