title: Error On Setting Up SMTP On Ofiice365 On Laravel
body: <p>When I am trying to set up SMTP mail account which my client gave there is an error where i could resolve ,</p>
  <p>Can someone help</p>
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=smtp.office365.com
  MAIL_PORT=587
  MAIL_USERNAME=xxxxxx
  MAIL_PASSWORD=xxxx
  MAIL_ENCRYPTION=tls used STARTTLS &amp; ssl
  </code></pre>
  <p>This is the error that i get</p>
  <pre><code>Swift_TransportException
  Failed to authenticate on SMTP server with username &quot;appointments@test.org&quot; using 2 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code &quot;535&quot;, with message &quot;535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit aka.ms/smtp_auth_disabled for more info. [SG2PR04CA0177.apcprd04.prod.outlook.com] &quot;. Authenticator XOAUTH2 returned Expected response code 235 but got code &quot;451&quot;, with message &quot;451 4.7.0 Temporary server error. Please try again later. PRX4 [SG2PR04CA0177.apcprd04.prod.outlook.com] &quot;.
  </code></pre>
  <p>Can someone help</p>
  <p>Thank you</p>