Send authenticated mails via Outlook through R using mailR package

前端 未结 2 1372
孤城傲影
孤城傲影 2021-01-01 08:32

How can I send mails from R via Outlook?

I was told to use the sendmailR package, but I could not figure out how to specify certain control settings (su

2条回答
  •  梦谈多话
    2021-01-01 09:00

    Or you can use DescTools::SendOutlookMail()

    library(DescTools)
    SendOutlookMail(to = c("me@microsoft.com", "you@rstudio.com"), 
                    subject = "Some Info", 
                    body = "Hi all\r Find the files attached\r Regards, Dude", 
                    attachment = c("C:/temp/fileA.txt", 
                                   "C:/temp/fileB.txt"))
    

提交回复
热议问题