2016-07-11 11 views
0
library("mailR") 
    sender <- "[email protected]" 
    bcc<- c("BCC Recipient <[email protected]>","BCC Recipient<[email protected]>") 
    send.mail(from = sender, 
       bcc<- c("BCC Recipient <[email protected]>","BCC Recipient<[email protected]>"), 
       subject = "subject", 
       body = "BODY 
       ", 
       authenticate=TRUE, 
       smtp = list(host.name = "smtp.gmail.com", port = 465, 
          user.name = "[email protected]",    
          passwd = "YOURPASSWORD", ssl = TRUE), 
       send = TRUE, 
       attach.files = c("C:/Users/admin/Desktop/Forecast.csv"), 
       file.names = c("Demand_Forecast.csv")) 

Do u wissen, wie Mail mit bcc zu schicken, was das Format ist? Es funktioniert, aber recipents einander könnenWeiß jemand, wie man in R bcc?

Antwort

1

Sie haben sehen fälschlicherweise verwendet, um den Zuweisungsoperator innerhalb der Funktion send.mail().

Dies sollte funktionieren:

library("mailR") sender <- "[email protected]" bcc<- c("BCC Recipient <[email protected]>","BCC Recipient<[email protected]>") send.mail(from = sender, bcc = c("BCC Recipient <[email protected]>","BCC Recipient<[email protected]>"), subject = "subject", body = "BODY", authenticate=TRUE, smtp = list(host.name = "smtp.gmail.com", port = 465, user.name = "[email protected]",
passwd = "YOURPASSWORD", ssl = TRUE), send = TRUE, attach.files = c("C:/Users/admin/Desktop/Forecast.csv"), file.names = c("Demand_Forecast.csv"))

Verwandte Themen