1

I have a table that I am trying to get to clients via sendmailR. I would like to stick to sendmailR as well. Here is what I am trying to do.

from <- 'my email'
to <- 'my email'
subject <- paste("the subject",Sys.Date(),sep=" ")
sendmail(from, to, subject, str, control = list(smtpServer="the correct server sits here"))

Sorry for all the censoring. Just know that this same exact code used to work about 4 months ago when I originally built the script it's in. Now to the error.

Here's what I am getting :

Error in wait_for(code) : SMTP Error: 5.7.1 Client was not authenticated

4

2 回答 2

1

该错误可能是您通过一个被阻止的端口发送。默认端口为sendmail25。如果您所在的位置无法控制服务器,请尝试询问技术人员您需要将其设置为什么服务器。这是执行此操作的命令。sendmail()在命令前添加

sendmail_options(smtpPort="25")

将 25 更改为您的技术人员告诉您的任何端口。

于 2015-05-29T16:22:01.257 回答
0

尝试使用支持 SMTP 身份验证的mailR ( https://cran.r-project.org/web/packages/mailR/index.html )。

于 2015-07-18T09:39:44.610 回答