1

Any idea how I would add an attachment to this email?

I tried to look at names(OutApp) to see if there was an "attachment" that I could assign to but there doesn't seem to be. Any ideas?

library(RDCOMClient)

SendEmail<-function(to, subject, body)
{
  ## init com api
  OutApp <- COMCreate("Outlook.Application")
  ## create an email 
  outMail = OutApp$CreateItem(0)
  ## configure  email parameter 
  outMail[["To"]] = "me@me.com"
  outMail[["subject"]] = subject
  outMail[["body"]] = body

  ## send it                     
  outMail$Send()

}
user3022875
  • 8,598
  • 26
  • 103
  • 167
  • Did you take a look at sendmailR [here](http://blog.yhathq.com/posts/building-email-reports-with-r.html)? – zipp Dec 11 '14 at 19:52

0 Answers0