finlist <- 1:10
library(mailR)
sender <- "SENDER@gmail.com"
recipients <- c("Recipent@gmail.com")
send.mail(from = sender,
to = recipients,
subject="From R",
body = finlist,
smtp = list(host.name = "smtp.gmail.com", port = 465,
user.name="SENDER@gmail.com", passwd="Password", ssl=TRUE),
authenticate = TRUE,
send = TRUE)
以上内容应发送电子邮件,主题为1,2,3,... 10。 但是收到以下错误。
file.exists(正文)出错:无效&#39;文件&#39;参数
答案 0 :(得分:1)
试
body =paste(finlist, collapse = ",")