0

当我尝试sendmailsendmailRR 中的包中使用时,我收到此错误:

Error in .smtp_submit_mail(server, port, headers, msg, verbose) : argument "msg" is missing, with no default

这是我要执行的代码:

library(sendmailR)
from <- "<some.address@gmail.com>"
to <- "<some.address@gmail.com>"
subject <- "this subject"
body <- "this text right here"
mailControl <- list(smtpServer = "ASPMX.L.GOOGLE.COM")
sendmail(from = from, to = to, subject = subject,
                  body = body, control = mailControl)

这与在线教程中的代码基本相同。

4

1 回答 1

1

电子邮件正文的参数被称为msg,而不是body。利用

sendmail(from = from, to = to, subject = subject,
                  msg = body, control = mailControl)
于 2020-07-28T21:43:14.810 回答