我正在使用 sendmailR 包来自动化我的电子邮件发送任务。我的代码是这样的:
要求(发送邮件R)
来自 <-“test1@sample.com”
到 <- 'test2@sample.com'
主题<-“电子邮件主题”
正文 <- “电子邮件正文。”
mailControl=list(smtpServer="mail.sample.com")
sendmail(from=from,to=to,subject=subject,msg=body,control=mailControl)
使用我的 64 位、Outlook 2007、Windows 7 机器运行上述代码没有问题,但是一旦我在 32 位、Outlook 2010、Windows XP 机器上运行相同的东西,就会收到此错误消息:
socketConnection 中的错误(主机 = 服务器,端口 = 端口,阻塞 = TRUE):无法打开连接
另外:警告信息:
在 socketConnection(host = server, port = port, blocking = TRUE) 中:mail.sample.com:25 无法打开
有人知道这是怎么发生的吗?