[英]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.