-->

What `control` settings are valid to send automate

2019-09-02 06:08发布

问题:

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?

Thanks in advance.

标签: r sendmailr