Gmail Is Disabling Less Secure Apps: What To Do Next

Use an App Password

If you’d like to continue using the Other SMTP mailer in Mail SMTP, you can set up an app password in your Google account.

An app password works like an alternate password for your account. It can only be used by the applications you share it with, so it’s more secure than sharing your primary password.

Add a name for your app password

If you’d like to use an app password, you’ll need to turn on two factor authentication for your Google account first.

After that, you can create an app specific password for WP Mail SMTP in the security settings for your Google account.

App password generated for WP Mail SMTP

Note: any time you change your main Google account password, it will deactivate your app passwords as well. If you change your password frequently, this may not be the best workaround.