Gmail SMTP Not Working Issue 2022

Gmail-SMTP-Not-Working
Gmail-SMTP-Not-Working

Recently, Google stop supporting less secure apps. That’s why Gmail SMTP not working.

In this short article to know how to fix Gmail SMTP not working issue 2022?

Using Gmail SMTP, You can send emails using third-party email clients like Thunderbird and Outlook. Many websites use PHP to send email via SMTP. Now, google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password. In order to use Gmail SMTP, there is required to configure it to solve gmail SMTP not working issue 2022. Follow the below steps to configure it.

How to Configure Gmail SMTP?

Follow the below steps for Gmail SMTP configuration.

Step 1

Login to Gmail and click on the user icon on the top right corner and select “Manage your Google Account”.

Step 2

Click on security from the left menu.

Step 3

Turn ON 2-Step verification.

security-tab-in-google-account
security-tab-in-google-account

Step 4

Click on “App passwords” – You need to login again with your Gmail account password
In the Select app dropdown select “Mail”, Select device dropdown select “Other” and give your application name. You can see in below screenshot.

google-app-mail
google-app-mail
google-app-name
google-app-name

Step 5

Click on the “Generate” button.
Now it will display 16 character password. copy this password and keep it safe. As afterward, you will not be able to see it. You can see it below the screenshot.

google-generated-app-password
google-generated-app-password

PHP mailer Gmail SMTP configuration

You have done Gmail SMTP settings. Now, You have App Name and Password. You can edit phpmailer configuration file as per below.

I hope it helped you. Please let us know in the comment section if you have any concerns.

Thank You!