1

I am using sendmailR to automatically send out emails. I want to cc a copy to one address in order to keep as a record. The code I've used is:

>from <- "<abc@sample.com.cn>"

>to <- 'def@sample.com.cn'

>header<-list(Cc=c("<hij@sample.com.cn>"))

>subject <- "test1"

>body <- 'test1';

>mailControl=list(smtpServer="mail.sample.com.cn")

>sendmail(from=from,to=to,subject=subject,msg=body,headers=header,control=mailControl)

The cc part never worked, and I could not figure out why. I've referred to this post: Is it possible to cc recipients using sendmail in R?, but it seems everything should be correct.

Anyone can help me with this?

Thanks!

Community
  • 1
  • 1
user2854008
  • 1,161
  • 4
  • 17
  • 23

1 Answers1

0

"cc" and "bcc" are arguments to sendmailR::sendmail as of version 1.2-1, which is available on CRAN: http://cran.r-project.org/web/packages/sendmailR/index.html

Quinn Weber
  • 927
  • 5
  • 10