I'm trying to add an exchange email account in my laravel application so that my emails will be sent from it.
I've tried mailtrap and it works fine as expected.
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=username
MAIL_PASSWORD=password
MAIL_ENCRYPTION=null
When I change these credentials to the actual email provided from my client, the emails are not sent.
My client has his own intranet with internal Microsoft exchange server.
I returned to laravel log file to find the following error:
local.INFO: Swift_TransportException: Failed to authenticate on SMTP
server with username "[email protected]" using 1 possible authenticators. Authenticator
NTLM returned Swift_TransportException: Expected response code 235 but
got code "535", with message "535 5.7.3 Authentication unsuccessful
Note that the credentials are correct, and I tried to change the given email account with another one and got the same result.
Any suggestion?