title: SMTP sendmail with HTML in Matlab
body: <p>I am trying to send emails via SMTP in Matlab. This guide is a good starting point to get started:</p>
  
  <p><a href="https://nl.mathworks.com/help/matlab/import_export/sending-email.html" rel="nofollow noreferrer">https://nl.mathworks.com/help/matlab/import_export/sending-email.html</a></p>
  
  <p>It boils down to the following lines of code (tested in 2016b):</p>
  
  <pre><code>setpref('Internet','E_mail','youraddress@yourserver.com');
  setpref('Internet','SMTP_Server','mail.server.network');
  
  sendmail('recipient@someserver.com','Hello From MATLAB!','body text here');
  </code></pre>
  
  <p>However, the default SMTP does not support HTML. I tried the following:</p>
  
  <pre><code>sendmail('recipient@someserver.com','Hello From MATLAB!','&lt;strong style="color:red"&gt;HTML test&lt;/strong&gt;');
  </code></pre>
  
  <p>How can I enable HTML? Is this something simple as setting certain preferences/encoding?</p>