Go to Site administration > Server > Email > Outgoing mail configuration

To get the SMTP servers functioning, only four values need to be set:
SMTP hosts: smtp.gmail.com:465 NOTE: Leave out the port (:465) in 1.9.2 or lower
SMTP security: SSL
SMTP username: Your email address @gmail.com or your own domain if using Google Apps
SMTP password: [YOUR APP PASSWORD. Read more about how to generate App Password below]

-

Sign in with App Passwords

An App Password is a 16-digit passcode that gives a less secure app or device permission to access your Google Account. App Passwords can only be used with accounts that have 2-Step Verification turned on.


Create & use App Passwords

Make sure you have the 2-Step Verification enabled on your Gmail account.

    1. Go to your Google Account.

    2. Select Security

    3. Select 2 Step-Verification. You may need to sign in and set up your account to proceed.




    1. Upon accessing inside the 2-Step Verification scroll down and select App Passwords.
      Image Placeholder
      You may need to sign in. If you don’t have this option, it might be because:

      1. 2-Step Verification is not set up for your account.

      2. 2-Step Verification is only set up for security keys.

      3. Your account is through work, school, or other organization.

      4. You turned on Advanced Protection.

    2. At the bottom, choose Select app and choose "Other (custom name)" Moodle SMTP Generate.

    3. Follow the instructions to enter the App Password. The App Password is the 16-character code in the yellow bar on your device.

    Tap Done.