Before using Gmail SMTP, you need to authorize your server to access your Google account.
Click here, log into your Gmail account, then click Continue
Note: You should use your main Google account to achieve this purpose
If you have merged accounts from google you will receive an authentication error
This will enable your account to access your new device (webserver).
You have to enable 2-step verification on your Google account, you would need to generate an application-specific password.
Select Other/Custom name from Select App, give it a name such as “DO – Production Server” and then click Generate.
Note down the application password as it will be required in the next step.
Now, open the link again and click Continue.
Enter the Gmail details inside SMTP app (to activate SMTP app).
- Enable “Use custom SMTP”
- Enter smtp.gmail.com as your host
- Use port 465
- Enter your Gmail login username firstname.lastname@example.org
- Enter your App password.
App password in step 5 is the app password generated in Step #2 above. It's NOT your Gmail account password.