title: Sending Outlook Emails via R workaround on OSX
body: <p>I've looked throughout the site but have not been able to find an answer.</p>
  
  <p>I need to use R to send emails via my works outlook email. It has to be from Outlook, not anywhere else.</p>
  
  <p>Problem is, the computer I'm using is OSX so <code>RDCOMClient</code> won't work. </p>
  
  <p>EDIT: Tried this and it wouldn't work.</p>
  
  <pre><code>sender&lt;-"myemail@outlook.com"
  recipients&lt;-c("myemail@outlook.com")
  send.mail(from = sender, to = recipients,
            subject = "Test",
            body = BodyOfMessage,
            smtp = list(host.name = "smtp-mail.outlook.com"),
            authenticate = FALSE,
            html = TRUE,
            send = TRUE)Does anyone have a workaround? 
  </code></pre>
  
  <p>And it resulted in this error:</p>
  
  <blockquote>
    <p>org.apache.commons.mail.EmailException: Sending the email to the
    following server failed : smtp-mail.outlook.com:25    at
    org.apache.commons.mail.Email.sendMimeMessage(Email.java:1410)    at
    org.apache.commons.mail.Email.send(Email.java:1437)   at
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)     at
    RJavaTools.invokeMethod(RJavaTools.java:386) Caused by:
    com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was
    not authenticated to send anonymous mail during MAIL FROM
    [BN6PR19CA0117.namprd19.prod.outlook.com]</p>
    
    <p>at
    com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2202)
      at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1693)
      at
    com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1194)
      at javax.mail.Transport.send0(Transport.jaNULL va:254)  at
    javax.mail.Transport.send(Transport.java:124)     at
    org.apache.commons.mail.Email.sendMimeMessage(Email.java:1400)    ... 6
    more Error: EmailException (Java): Sending the email to the following
    server failed : smtp-mail.outlook.com:25</p>
  </blockquote>