Moodle relies on email for password resets, account confirmation, forum subscriptions, notifications and reports. SMTP settings provide the route, but successful delivery also depends on cron, DNS authentication, sender policy and the receiving mail system.
Collect the required details
Ask the mail provider for the SMTP hostname, port, encryption mode, authentication method, username, credential or app password, allowed sender address and sending limits. Do not guess that port 25, 465 or 587 uses the same security on every provider.
Open Moodle’s outgoing mail settings
Go to Site administration > Server > Email > Outgoing mail configuration. Enter the SMTP hosts in Moodle’s expected format, then configure the encryption and authentication fields to match the provider.
Use a dedicated service account where possible. Store the credential only in the authorised configuration surface and rotate it according to organisational policy. Never include it in screenshots, tickets or course content.
Set sender and support identities
Configure the no-reply address and support contact with domains your mail service permits. A visible From address that the SMTP account is not authorised to use may be rejected or rewritten. Decide whether replies should go to a monitored support address.
Understand SMTP security options
TLS settings must match the provider. A certificate error should be fixed at the trust, hostname or server level; disabling certificate validation is not a safe production solution. If the provider requires OAuth or an app-specific password, a normal account password may fail even when it works for webmail.
Test from Moodle
Use Moodle’s outgoing-mail test tool when available and send to an external mailbox. Confirm receipt, headers, From/Reply-To values and whether the message lands in spam. A test proves immediate SMTP connectivity; it does not prove that scheduled forum or course mail will run.
Verify cron
Run Moodle cron every minute and inspect scheduled and ad hoc tasks. Many messages are queued for background delivery. If password resets send immediately but forum digests do not, the issue may be scheduling rather than SMTP.
Configure domain authentication
Work with the domain administrator to publish correct SPF and DKIM records and a sensible DMARC policy. These records are outside Moodle but strongly affect delivery and spoofing protection. Align the authenticated service, envelope sender and visible domain with the provider’s requirements.
Common SMTP errors
- Connection timeout: firewall, hosting provider or wrong host/port.
- Authentication failed: wrong username, expired credential, OAuth requirement or disabled SMTP AUTH.
- TLS/certificate failure: mismatched hostname, missing CA certificates or wrong encryption mode.
- Relay denied: the account cannot send for the chosen From domain.
- Mail accepted but not delivered: inspect provider logs, bounces, spam filtering and DNS authentication.
- Only queued mail fails: check cron and ad hoc tasks.
Production checklist
- A dedicated sender identity is configured.
- TLS is enabled as the provider specifies.
- Credentials are protected and rotation is documented.
- SPF, DKIM and DMARC are verified.
- Cron runs every minute.
- Bounces and provider limits are monitored.
- Password reset and representative course notifications are tested.
Final advice
Troubleshoot delivery from Moodle to SMTP, from SMTP to the recipient domain, and finally inside the mailbox. Keep those layers separate. For a clearer login and notification journey after mail is dependable, browse Themes Almond Moodle themes.
Source check: Verified against Moodle 5.3’s official installation guidance and scheduled-task documentation.