What `control` settings are valid to send automated emails from Outlook using `sendmailR`?

五迷三道 提交于 2019-12-11 04:27:50

问题


EDIT: I found a solution. You can find it here. I had to resort to using mailR. I could never get sendmailR to work with the Office 365 services.

I am trying to send a single email using library(sendmailR) to later send daily automated emails to about 500 people. Unfortunately, I'm suck in step 1.

It is vital that I send these emails from my institution's Outlook account. I have no idea what control settings to use in order to successfully send mails from Outlook. I checked a couple of questions but they are either using the gmail SMPT server or they do not specify the control = ... settings they used. For example:

Use sendmailR with Windows

Sending an email from R

This is what I'm working with:

from <- "<myaccount@institution.org>"
to <- "<boss@institution.org>"
subject <- "Hello from R"
body <- list("It's working.")

sendmail(from, to, subject, body,
         control = list(smptServer = "oultook.office.365", port = 443))

And I'm getting the following error message:

Error in wait_for(code) : 
SMTP Error: 5.7.57 SMTP; Client was not authenticated to send anonymous mail 
during MAIL FROM [SN4PR0501CA0061.namprd05.prod.outlook.com]

I believe I'm not specifying the port correctly. The sendmaiLR documentation is not specific enough, but something tells me I should be writing the port as "port 443"or something along those lines.

Does anyone know what controlsettings I should be using?

来源:https://stackoverflow.com/questions/52840058/what-control-settings-are-valid-to-send-automated-emails-from-outlook-using-s

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!