title: How to send HTML email using R
body: <p>I have searched SO and well as google and cannot seem to find a solution to my problem. I am trying to send a HTML formatted email within R using sendmailR package. The plain text email works just fine, but then  am unable to switch from plain text to HTML.</p>
  
  <p>My code:</p>
  
  <pre><code>require(sendmailR)
  from &lt;- "alertbot@companyname.com"
  message = "&lt;HTML&gt;&lt;body&gt;&lt;b&gt;Hello&lt;/b&gt;&lt;/body&gt;&lt;/HTML&gt;"
  to = c("me@companyname.com")
  subject = "Test Monitor Alert"
  
  sendmail(from, to, subject, msg = msg,control=list(smtpServer="smtp-gw1.wal-mart.com"),headers=list("Content-Type"="text/html; charset=UTF-8; format=flowed"))
  </code></pre>
  
  <p>I do get the email, but its in plain text and the email body contains the message as is instead of the HTML formatted text. Please help.</p>