**Update Latest Version of Joomla 3**
Enable 2-Step Authentication on your Gmail Account.
Login to your Gmail account and head to 2-Step Verification
Click Get Started
You will need to setup a phone number to use 2-step verification with.
After verifying your phone, the next screen will ask you to Turn On 2-Step pictured below
Next, generate an App Password here
The app password will be used one-time for the Joomla
website you want to setup email on.
Google Gmail recently introduced OAuth 2.0
which uses enhanced features for certain apps to only be allowed to send email from. This feature seems to be preventing the latest version of Joomla 3 from successfully sending emails on behalf of a Gmail email address. You can find more info here.
If you attempt to setup Joomla with the following settings and send a test mail, you may receive an email for sign-in attempted prevented and information that an app doesn’t meet modern security standards.
You will also receive the following error messages in Joomla backend Test mail could not be sent. SMTP Error: Could not authenticiate.
As a workaround, you will need to enable Less Secure Apps feature in your Gmail account you are trying to send emails from in Joomla.
Login to your Gmail Account
Enable Access for less secure apps
Now you will be able to successfully send emails using a Gmail account through your Joomla site backend.