title: Expected response code 235 but got code 535 laravel send email using office365 smtp
body: <p>I want to send email using my office365 smtp credentials in laravel application. i have make changes in my .env file for email settings as below:</p>
  
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=smtp.office365.com
  MAIL_PORT=587
  MAIL_USERNAME=info@***.com
  MAIL_PASSWORD=*******
  MAIL_ENCRYPTION=tls
  </code></pre>
  
  <p>while i am trying to send email i got error like </p>
  
  <pre><code>Failed to authenticate on SMTP server with username \"info@omoyyc.com\" using 2 possible authenticators. Authenticator LOGIN returned Swift_TransportException: Expected response code 235 but got code \"535\", with message \"535 Incorrect authentication data\r\n\"
  </code></pre>
  
  <p>my email sending code is as below </p>
  
  <pre><code>Mail::send(array(), array(), function ($m) use ($templatecontent) {
          $m-&gt;from('customerservice@****.com', 'TEST');
          $m-&gt;to('test@gmail.com', 'Test')
                  -&gt;subject($templatecontent['subject'])
                  -&gt;setBody($templatecontent['content'], 'text/html');
      });
  </code></pre>
  
  <p>Can anyone guide me what is the issue and how to solve this issue?</p>