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!