[英]How to avoid `"msg" is missing` error using sendmail in R?
当我尝试使用来自 R 中的sendmail
package 的sendmailR
时,出现此错误:
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)
这基本上与可以在在线教程中找到的代码相同。
email 的正文参数称为msg
,而不是body
。 采用
sendmail(from = from, to = to, subject = subject,
msg = body, control = mailControl)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.