To setup SMTP connection with Gmail, go to Settings -> Mail and set options as shown in the example below. You will need to replace example data with your own username and app password.

Example configuration:
Connection type: SMTP
SMTP Host: smtp.gmail.com
SMTP Port: 587
SMTP Username: [email protected]
SMTP Password: ••••• (App password, see below how to create one)
SMTP Security: TSL

After configuring and saving all the settings according to the example above, you can check if the connection to your email account has been successfully established by sending a test email (Settings -> Mail -> Send a test email). If you see any error messages after sending a test message, please follow the instructions in the FAQs section below.

 

How to create an App Password for Gmail?
This online guide explains step by step how to do it.

 

FAQs
Q: “Expected response code 250 but got code “535”, with message “535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials t202sm10704752wmt.20 – gsmtp”

A: Make sure you have created and entered the correct app password as per the instructions above.