Websites and applications
Set up Moodle to send email using SMTP
Set up authenticated SMTP sending for Moodle's notifications and check that they are received. SMTP alone does not guarantee that an email reaches the inbox.
Forum, activity and admin notifications can generate quite a lot of email. Review the sender, the domain's authentication and the volume, even though they are not marketing campaigns.
SMTP settings
As an administrator, go to Site administration > Server > Email > Outgoing mail configuration in Moodle. If the account belongs to the same Hostsuar hosting that runs Moodle, set up the local connection like this:
- SMTP hosts: localhost
- SMTP security: None (as it is a local connection, encryption is not needed)
- SMTP Auth type: LOGIN
- SMTP username: the full email address you will send from, which must be created as such in cPanel.
- SMTP password: the password for that account.
- SMTP session limit: 1
Unencrypted localhost is only valid for this connection within the same server. For Google Workspace, Microsoft 365 or another external service, use the hostname, port, security and authentication that provider specifies.
Save the changes and use Site administration > Server > Test outgoing mail configuration to send a test message. Also confirm that Moodle's cron is running, because many notifications are processed by scheduled tasks.
Further recommendations
We also recommend stopping notification emails from being sent one by one, which can create a high volume when users receive a notification for every forum reply; that sending volume may be penalised by providers such as Gmail.
Go to Dashboard / Site administration / Users / Accounts / User default preferences and change the Email digest type field to Complete (daily email with full posts).
The digest applies to forums; it does not automatically group every notification on the site. Users may have their own preferences, or different ones per forum; changing the default value is not the same as enforcing it on every existing account.
If the SMTP test arrives but an activity does not send notifications, check its recipients, preferences and pending tasks before changing credentials. If the test fails, keep the error without sharing passwords and see the Moodle mail configuration documentation.
You may also find useful
- Connect TastyIgniter to the marketplace to install plugins Explains how to register a site on TastyIgniter, get its Carté key and link it from the admin panel...
- FacturaScripts: install invoicing and accounting on your hosting Describes what FacturaScripts offers and how to install it on your hosting with its own database, pr...
- Install Moodle 5 from Softaculous Check the requirements for Moodle 5, prepare a subdomain with its public folder and install it from...
- Install Omeka S from Softaculous Guides you through installing Omeka S from Softaculous, choosing the domain and directory, the check...
Something wrong or out of date? Tell us and we will review it.