I hope that isn’t your actual password!!
Have office365 tightened up rules on authorisation that might be causing problems?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a laravel application that has been sending emails for Years now. Recently, emails have been failing to send. When I check the failed_jobs table and Laravel log, below is the error message:
Swift_TransportException: Expected response code 250 but got code "", with message "" in /apps/www/ccc.xxxx.com/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:383
Below are things I have attempted:
composer dump-autoload
php artisan config:cache
php artisan config:clear
php artisan queue:restart
restarted supervisor
Ensure username and password is correct in .env file
I have connected to the mail box successfully and able to send email to anyone
Below is the .env config
MAIL_DRIVER=smtp MAIL_HOST=smtp.office365.com MAIL_PORT=587 [email protected] MAIL_PASSWORD=Va2016 MAIL_ENCRYPTION=TLS
The server runs on PHP 7.1.33. I suspect they might have been an upgrade to the PHP version which can cause this issue. But I am not really sure because others who use the server as well say they have not done any upgrade.
What can be the issue and how to fix this ?
Please or to participate in this conversation.