MATLAB: How to send HTML email

contentemailhtmlmailMATLABsendmailtype

Is there a way to set the content type to HTML instead of text/plain? I've created my HTML message into a Var and I'm trying to send it via sendmail, but the message is not received as expected. The mail app is just showing the HTML code truncated as if it where a plain text mail. How can I fix the content-type header? Example:

Best Answer

I solved this patching the sendmail.m source like this:
msg.setContent(body, 'text/html; charset=utf-8');
Instead:
msg.setText(body, charset);
Related Question