Line break does not work in MailMessage module

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/>

+3
source share
1 answer

Your tags are not correct. They should be written as:

<br />
+8
source

All Articles