Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何避免`";味精;在R中使用sendmail时是否缺少`错误?_R_Sendmailr - Fatal编程技术网

如何避免`";味精;在R中使用sendmail时是否缺少`错误?

如何避免`";味精;在R中使用sendmail时是否缺少`错误?,r,sendmailr,R,Sendmailr,当我试图从R中的sendmailR包中使用sendmail时,出现以下错误: 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 &l

当我试图从R中的
sendmailR
包中使用
sendmail
时,出现以下错误:

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)
库(sendmailR)

从中,电子邮件正文的参数称为
msg
,而不是
body
。使用

sendmail(from = from, to = to, subject = subject,
                  msg = body, control = mailControl)