How to Fix Swift_TransportException (530) in Laravel 5.7

In this Post i show How to solve Swift_TransportException (530) : Expected response code 250 but got code 530 with message 530 5.7.1 Authentication required Error in Laravel.

When you Got this error :

When you trigger to send Mails with misconfigured Mailables and then this error occured.

How to Fix this Error :

Check your Mailable Configuration values.

I use mailtrap.io for testing emails in local Environment.

Register and login your account in mailtrap.io and goto demo inbox settings.

Get your mailable configuration Credentials

Just need to edit your .env file like below:

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=**********
MAIL_PASSWORD=**********
MAIL_ENCRYPTION=null

After modify your settings in .env you need to run following commands

Clear cache

php artisan config:clear

Clear config

php artisan cache:clear

Restart your server

sudo service apache2 restart

Try to clear your browsers cache & cookies and try again Hope that works

Note : if you using Gmail account as SMTP you must turn on less secure app settings in your Gmail account here https://myaccount.google.com/lesssecureapps

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *