Google has provided facility to send email from magento 2 SMTP plugins. There are many magento 2 plugins available at free of cost and almost all are working fine. But recently google changed its policy for “Less secure apps & your Google Account” and remove that feature from all gmail account setting on date May 30, 2022. This cause issue while sending email from SMTP using gmail account. You might see this message in your account in “Less secure apps” section in your gmail acccount. This is the root cause which stop email from SMTP extention.
To get rid of SMTP email issue , there is some setting you need to do in your google account. Please follow below step to make smtp working on your account:
To confirm 2 factor authentication enabled in your account , simply Click on “Setting” icon from your gmail account and Click on “See all Setting” button.
Then click on “Account and Import” tab and click on “Other Google Account settings” link.
It will open new tab. Then click on “Security” tab from left navigation menu.
Once you have confirmed that 2 factor is enabled under your account, proceed to the next step.
Once you enabled 2FA then it will show status like below in your screen.
Then click on “App passwords” link. it will redirect you to App password page where you need to create new password fort SMTP connection with your mail account.
Click on Select App and it shows you dropdown with different option. Select “Other (Custom name)” from option and Enter the name you want to set as App name. Then press Generate. I will generate 16 digit password for you.
Use your email id as username and above 16 digit app generated password as password in your SMTP setting and enjoy gmail SMTP service.