Gmail SMTP server stopped working

11th Jan, 2023

So some users are fetching issues with sending mail by Gmail SMTP. Google stopped support for Less Secure Apps. 

But nothing to worry about! It's still very simple to send emails. To send an email again you need to do the bellow:

  1. Login to your Gmail
  2. Go to the Security setting and Enable 2-factor authentication
  3. After enabling this you can see the app passwords option. Click here!
  4. And then, from Your app passwords tab select the Other option and put your app name and click GENERATE button to get a new app password.
  5. Finally copy the 16 digits of the password and click done. Now use this password instead of an email password to send mail via your app.

Now you can use just email and this generated pass to send an email.


Here is an example of a GMAIL SMTP config


MAIL_DRIVER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
MAIL_USERNAME=ENTER_YOUR_EMAIL_ADDRESS(GMAIL)
MAIL_PASSWORD=ENTER_YOUR_GMAIL_PASSWORD
MAIL_ENCRYPTION=ssl