Below is the code created to send an email via r
.
OutApp <- COMCreate("Outlook.Application")
outMail = OutApp$CreateItem(0)
outMail[["To"]] = "personperson@gmail.com"
outMail[["subject"]] = "SUBJECT"
outMail[["body"]] = paste("Hello","Below are the contents of the email")
outMail$Send()
The output is :
Hello Below are the contents of the email
The output should be:
Hello
Below are the contents of the email
Thank you for the help.