title: Laravel 5.8 Email with SMTP and Office 365
body: <p>I have been trying to send email for password reset but never receive the email.</p>
  
  <p>No error on the page so not sure how to debug it.</p>
  
  <p>Following is my <code>.env</code> configuration</p>
  
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=smtp.mailtrap.io
  MAIL_PORT=2525
  MAIL_USERNAME=myUsername
  MAIL_PASSWORD=myPassword
  MAIL_FROM_ADDRESS='From email address'
  MAIL_FROM_NAME='Demo App'
  </code></pre>
  
  <p>Now when I reset the password, I get success message but do not receive email.</p>
  
  <p>When I use following piece of code just to test emails, it works fine</p>
  
  <pre><code>\Mail::send('emails.send', ['title' =&gt; 'Password Rest', 'message' =&gt; 'Message has the token to reset password'], function ($message)
      {
          $message-&gt;from('from email address', 'Scotch.IO');
          $message-&gt;to('To email address');
      });
  </code></pre>
  
  <p>I am just testing with <code>mailtrap</code> but will be using Office 365 with following configuration</p>
  
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=smtp.office365.com
  </code></pre>
  
  <p>How do I debug the mail error or resolve this problem?</p>
  
  <p>Thank you</p>