Gmail with Moodle for Outgoing Email (SMTP)

You can use Gmail (including Google Workspace) to send emails via Moodle. Here are the settings required:

Google accounts enforce 2 step security (2FA) and you will need to enable this on your Google account first. You then need to set up an app password which will become the password you will use for in the Moodle outgoing mail configuration.

In your Google account:

  • Login with the relevant account to
  • On the left go to security
  • You should already have 2FA (2 Step Verification) enabled but if not, enable 2FA first otherwise you won't have the ability to set up app passwords
  • Select App passwords
  • Add a new one, select app Mail and select device as "Other". A good name might be Moodle or the name or your Moodle instance.
  • The generated password is the one you use for the SMTP password field.

In Moodle as a site administrator:

Site administration > Server > Email > Outgoing mail configuration
  • SMTP hosts: This requires both the server address and port (587 for TLS):
  • SMTP security: TLS
  • SMTP Auth Type: LOGIN
  • SMTP username:
  • SMTP password: your app password (not your actual password)

Further down you also need to change the No-reply address to the same email address as your SMTP username email address.

1 Comment
#1    Deleted User commented 2 years ago

Please let me know of an email address where I can contact the owner of this wiki? Thank you

Back to top