我无法sendmailR
通过 Outlook 发送包含包裹的电子邮件。它在我的主计算机(Windows 机器)上运行良好,但是当我在运行 Ubuntu 的虚拟机上尝试它时,出现以下错误:
Error in socketConnection(host = server, port = port, blocking = TRUE) :
cannot open the connection
In addition: Warning message:
In socketConnection(host = server, port = port, blocking = TRUE) :
MYADRESSE.local:25 cannot be opened
我使用以下代码再次在主机上正常工作。
library(sendmailR)
from <- "myname@company.com"
to <- "myname@company.com"
subject <- "Performance Result"
body <- "This is the result of the test:"
mailControl=list(smtpServer="MYADRESSE.local")
sendmail(from=from,to=to,subject=subject,msg=body,control=mailControl)
我必须设置虚拟机才能访问MYADRESSE.local
吗?两者(主机和托管)之间的网络设置为“桥接”。我的最终目标是使用闪亮的服务器创建一个能够通过主机的主 Outlook 发送电子邮件的应用程序,目前,电子邮件完美地放在一边工作。