Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

[R]:RDCOMClient and outlook : how to send to multiple recipients or cc someone?

Tags:

r

outlook

as title, I have tried and failed... This is a piece of code I found in another thread and it works for only one recipient. Thanks in Advance.

OutApp <- COMCreate("Outlook.Application")
outMail = OutApp$CreateItem(0)
outMail[["To"]] = "xxx@xxx"
outMail[["subject"]] = "xx"
outMail[["body"]] = ""
outMail$Send()
like image 241
Ogre Magi Avatar asked Mar 18 '16 18:03

Ogre Magi


1 Answers

use this highlighted code to share the emails to multiple lists

outMail[["To"]] = paste("[email protected]","[email protected]", sep=";", collapse=NULL)

same logic with Cc for multiple list except below thing

outMail[["Cc"]]= "[email protected]"
like image 117
Rohit Avatar answered Jun 16 '23 23:06

Rohit