title: HTML files as attachments being manipulated (Python/smtplib)?
body: <h5>Python 3.9.7 / Microsoft Office 365 Exchange Online</h5>
  <p>My application uses <code>email.message</code> to create email messages and <code>smtplib</code> to send them.  It uses an SMTP server (M365 Exchange Online) on my company's domain to send mail.</p>
  <p>Scenario:  My application sends an email from my company's domain (company.com) to two recipients:  (1) me@company.com and (2) me@outlook.com.</p>
  <ul>
  <li>The email has an HTML file (a report) as an attachment.</li>
  <li>For recipient me@outlook.com:
  <ul>
  <li>The HTML file received opens successfully in a (any) web browser.</li>
  <li>The HTML file received is 3.45MB.</li>
  </ul>
  </li>
  <li>For recipient me@company.com:
  <ul>
  <li>The HTML file received opens as a blank page in a (any) web browser.</li>
  <li>The HTML file received is 3.00MB.</li>
  </ul>
  </li>
  <li>The two HTML files (obviously) do not have the same SHA256 checksum.</li>
  <li>All other file types sent as attachments are the same size and SHA256 checksum between the two recipients.</li>
  </ul>
  <p>I have tried changing the encoding of the file from <code>text/html</code> to <code>text/plain</code> and <code>application/octet-stream</code>.  No change in results.</p>
  <p>Relevant code:</p>
  <pre><code>fsubtype = ftype.split('/')[1]
  ftype = ftype.split('/')[0]
  with open(file, mode='rb') as fh:
      content = fh.read()
      msg.add_attachment(content, maintype=ftype, subtype=fsubtype, filename=fname)
  </code></pre>
  <p>Any ideas?</p>