HTML email sent by SMTPclient gets Office365 disclaimer inserted before body

127 views Asked by At

My program creates an email whose body is just made up of an html table. When it sends outside my company, the company disclaimer gets added in. However, it's added at the beginning rather than the end of the email. Or, if I add more html in the body (other than the table), it appears first, followed by the disclaimer, with the table always the last thing in the email. Why would the disclaimer be inserted this way?

My email (just in a string):

<body>
   <p>sometext</p>
   <table>
      <tr>
         <th>header1</th>
         <th>header2</th>
      </tr>
   </table>
</body>

How it's sent in the code:

MailAddress mailto = new MailAddress([email protected]);
mail.To.Add(mailto);
mail.From = sender;
mail.Subject = emailSubject;
mail.Body = emailBody;
mail.IsBodyHtml = true;
smtpServer.Send(mail);

In Office365 Outlook online mail client, how it shows up is sometext, followed by the company disclaimer (which is not added by me), followed by the table. However in gmail, it shows up as sometext, followed by the table, followed by the disclaimer which is formatted as if it is part of the first column of the table.

0

There are 0 answers