title: JavaMail base64 encoding
body: <p>I have some Java code which sends out an email with code somewhat like the following:</p>
  
  <pre><code>MimeBodyPart part = new MimeBodyPart();
  part.setContent(htmlString, "text/html; charset=\"UTF-8\"");
  part.setHeader("MIME-Version", "1.0");
  part.setHeader("Content-Type", "text/html; charset=\"UTF-8\"");
  part.setHeader("Importance", severityVal);
  
  mimeMultiPart.addBodyPart(htmlPart);
  mimeMessage.setContent(mimeMultiPart);
  </code></pre>
  
  <p>... and so on.</p>
  
  <p>How can I encode the "part" MimeBodyPart in base64 for this outgoing email?</p>