Expected response code 220 but got code "" with message "" Expected response code 220 but got code "" with message "" laravel laravel

Expected response code 220 but got code "" with message ""


I think you should define mail sender (MAIL_FROM_ADDRESS) as your gmail which you want to use send emails with.

for example, if your MAIL_USERNAME at .env is example@gmail.com you should define your MAIL_FROM_ADDRESS (or of course $mail->from()) as example@gmail.com.

I don't think gmail allows you send emails as another user (another address).


Similar problem587 port

MAIL_DRIVER=smtpMAIL_HOST=smtp.gmail.comMAIL_PORT=587MAIL_USERNAME=username@gmail.comMAIL_PASSWORD=mypassword


MAIL_DRIVER=smtpMAIL_HOST=smtp.gmail.comMAIL_PORT=465MAIL_USERNAME=address@gmail.comMAIL_PASSWORD=secreatMAIL_ENCRYPTION=ssl

Update above code in Your .env file and then run these commands in terminal

  1. composer dump-autoload

  2. php artisan serve