title: What `control` settings are valid to send automated emails from Outlook using `sendmailR`?
body: <blockquote>
    <p>EDIT: I found a solution. You can find it <a href="https://stackoverflow.com/questions/53074411/send-authenticated-mails-via-outlook-through-r-using-mailr-package">here</a>. I had to resort to using <code>mailR</code>. I could never get <code>sendmailR</code> to work with the Office 365 services.</p>
  </blockquote>
  
  <p>I am trying to send a single email using <code>library(sendmailR)</code> to later send daily automated emails to about 500 people. Unfortunately, I'm suck in step 1.</p>
  
  <p>It is vital that I send these emails from my institution's Outlook account. I have no idea what <code>control</code> 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 <code>control = ...</code> settings they used. For example:</p>
  
  <p><a href="https://stackoverflow.com/questions/15421130/use-sendmailr-with-windows">Use sendmailR with Windows</a></p>
  
  <p><a href="https://stackoverflow.com/questions/5864400/sending-an-email-from-r-using-the-sendmailr-package">Sending an email from R</a></p>
  
  <p>This is what I'm working with:</p>
  
  <pre><code>from &lt;- "&lt;myaccount@institution.org&gt;"
  to &lt;- "&lt;boss@institution.org&gt;"
  subject &lt;- "Hello from R"
  body &lt;- list("It's working.")
  
  sendmail(from, to, subject, body,
           control = list(smptServer = "oultook.office.365", port = 443))
  </code></pre>
  
  <p>And I'm getting the following error message:</p>
  
  <pre><code>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]
  </code></pre>
  
  <p>I believe I'm not specifying the port correctly. The <a href="https://cran.r-project.org/web/packages/sendmailR/sendmailR.pdf" rel="nofollow noreferrer">sendmaiLR documentation</a> is not specific enough, but something tells me I should be writing the port as <code>"port 443"</code>or something along those lines.</p>
  
  <p>Does anyone know what <code>control</code>settings I should be using?</p>