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.
My code:
require(sendmailR)
from
message = "
Hello"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"))
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.