title: "Expected response code 250 but got code "554", with message "554 5.2.0 STOR EDRV "
body: <p>I would like to send an email with an attachment. Using smtp.office365.com</p>
  
  <h2><strong>IN Production: ubuntu</strong></h2>
  
  <p>smtp.office365.com - Laravel 5.</p>
  
  <p>Expected response code 250 but got code "554", with message "554 5.2.0 
  STOR EDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied;   Failed to process message due to a permanent exception with message Cannot  submit message.</p>
  
  <h2><strong>IN Localhost :</strong></h2>
  
  <p>Expected response code 250 but got code "530", with message "530 5.7.57 SMTP; Client was not authenticated to send   anonymous mail during MAIL FROM [xxxxxx.xxxx.PROD.OUTLOOK.COM]"</p>
  
  <h2>.env</h2>
  
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=smtp.office365.com
  MAIL_PORT=587
  MAIL_USERNAME=xxx@org.io
  MAIL_PASSWORD='xxxxx'
  MAIL_ENCRYPTION=tls
  </code></pre>