title: Unable to send SMTP mails using office365 settings
body: <p>I am using SMTP mail for sending mail using Laravel. Everything working perfect other than office365 mail settings.</p>
  
  <p>Settings I have used is as below:</p>
  
  <pre><code>SMTP HOST = smtp.office365.com
  SMTP PORT = 587
  SMTP ENCRYPTION = tls
  SMTP USER = username(email)
  SMTP PASS = password
  </code></pre>
  
  <p>Error i am getting is:</p>
  
  <blockquote>
    <p>554 5.2.0
    STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied;
    Failed to process message due to a permanent exception with message
    Cannot submit message</p>
  </blockquote>
  
  <p>I have already searched google a lot for this error everybody says about clutter like this link
  <a href="https://support.microsoft.com/en-us/help/3132755/554-5-2-0-storedrv-deliver-exception-objectnotfoundexception-mapiexcep" rel="noreferrer">Solution to this error</a>
  But I personally don't find any clutter after followed all the steps mentioned.</p>
  
  <p>I cannot log in this email as it's our client email id and I don't have permission to log in.</p>
  
  <p>I also created one outlook email id and test this email setting. 
  It worked like charm. 
  I don't know what is wrong with Client email id.</p>
  
  <p>Any suggestions would be great.</p>