title: How to preserve newline wrapping via SMTP where the email body needs to support HTML
body: <p>So I'm building an auto-emailing script that will send out receipts to employees once they log an issue, the email needs to allow <code>HTML</code>.</p>
  
  <p>However, when I pull the description out of the database and display it on the front end (<code>asp:textbox</code>) of the <code>.aspx page</code> it displays with new line characters, formatted properly but when I send the description via SMTP to recipients the line breaks (newline characters) don't wrap the text to the new line.</p>
  
  <p>E.g:
  Example string: "Bob is a human,\n and he likes basketball"
  In <code>asp:textbox</code> controls it renders properly but when sent via the email it doesn't.</p>
  
  <p>What's the crack with that? Do I need to replace the <code>\n</code> with <code>HTML</code> breaks as they come through or can you preserve them?</p>
  
  <p>Here's the basic idea of what the script is:</p>
  
  <pre><code>SmtpClient client = new SmtpClient();
  client.Port = 587;
  client.Host = "smtp.outlook.com";
  client.EnableSsl = true;
  client.Timeout = 10000;
  client.DeliveryMethod = SmtpDeliveryMethod.Network;
  client.UseDefaultCredentials = false;
  client.Credentials = new System.Net.NetworkCredential(serverEmail, serverEmailAuthToken);
  
  MailMessage mm = new MailMessage(serverEmail, recipient, "Tasket Report Number: "
                                   + tasketTitle + " has been received.",
                                   "Tasket Report Number: " + tasketTitle + "&lt;br/&gt;"
                                   + "Problem Domain: " + domain + "&lt;br/&gt;"
                                   + "Report Type: " + type + "&lt;br/&gt;"
                                   + "Report Area: " + area + "&lt;br/&gt;"
                                   + "Description: " + description
                                   + "&lt;br/&gt;");
  mm.IsBodyHtml = true;
  mm.BodyEncoding = UTF8Encoding.UTF8;
  mm.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
  client.Send(mm);
  </code></pre>