How to Configure Gmail in Moodle for Sending Emails

This article explains how to configure Gmail in Moodle for sending emails. First, log in to Gmail, go to Security settings, and generate an app-specific password under Two-step verification. Then log in to the Moodle management page, navigate to Site administration → Server → Outgoing mail configuration, enter your Gmail address as the SMTP username and paste the app-specific password into the SMTP Password field. Finally, scroll down and click 'Test outgoing mail configuration' to send a test email and verify everything works.

Step 1: Configure Application-specific password Gmail

  1. Login to Gmail and click on security on the left bar
    login-to-gmail-and-click-on-security

  2. Generate the Application-specific password on Two-step verification
    generate-the-application-specific-password
    generate-the-application-specific-password-create
    generate-the-application-specific-password-finish

Step 2: Configure the Gmail to Moodle application

  1. Login to Moodle management page

  2. Locate to Outgoing mail configuration page: Click on Site administration, then click on server bar and move to the bottom to find Outgoing mail configuration
    locate-to-outgoing-mail-configuration

  3. Input email address on SMTP username and copy paste the application-specific password on SMTP Password bar
    input-email-address-and-copy-paste-the-password

  4. Test if mail is sending out properly: Move down on the same page and then click on Test outgoing mail configuration. Then sending a test mail to check if everything is working
    https://images.cloudclusters.io/ce13a9c8943c4a21a2b314835c78f4e7/test-mail.png

Keywords:

Moodle email configuration, send test email in Moodle, Gmail SMTP for Moodle

Last Updated:   11/13/2026
Outline