If you receive an SMTP error, you must enable Gmail to accept less secure apps.
- Go to your Google Account
- On the left navigation panel, click Security
- On the bottom of the page, in the Less secure app access panel, click Turn on access
- If you don't see this setting, your administrator might have turned off less secure app account access (check below)
- Click on Save
Turning on 'less secure apps' settings as mail domain Administrator:
- Open your Google Admin console
- Click on Security > Basic Settings
- Under Less secure apps, select Go to settings for less secure apps
- In the sub-window, select the Enforce access to less secure apps for all users radio button.
(You can also use the Allow users to manage their access to less secure apps, but don't forget to turn on the less secure apps option in users settings then!) - Click on Save