Mail configuration

Server settings


Outgoing mail configuration

Settings related to mail sent by Moodle can be found in 'Outgoing mail configuration' in Site administration.

The setting 'Allowed email domains' (allowedemaildomains) allows us to enter domains allowed by your mail server so that emails can be sent from users' real addresses. It accepts a wildcard for conveniently adding a lot of domains (*.example.com - tim@first.example.com), or a strict match (example.com - tim@example.com).

If allowed domains are set then the user's email address will be used in the "From" and "Reply to" field only in the following situations:

All other situations use the no-reply address.

(In Moodle 3.2 onwards, the setting ' 'Allowed email domains' replaces the setting 'Always send from no-reply address'.)

The setting 'Email via information' (emailfromvia) adds via information in the From section of outgoing email to inform the recipient where the email came from:

Name (via shortname) <noreplyaddress>

'shortname' is the short name for the site as set in the front page settings.


Incoming mail configuration

If incoming mail processing is enabled in 'Incoming mail configuration' in Site administration, then users are able to reply to forum posts via email and send files to their private files as email attachments.


Mailbox configuration

Use a dedicated email address here. Do not use one normally used for personal emails. We do not need to add the @ sign. If you have set up the email mountorangeschool @ besteveremail.com then it would be entered as in the following screenshot:


Incoming mail server settings

For example, if we are using gmail you would use IMAP.gmail.com in the Incoming mail server (messageinbound_host) field. (If using gmail also make sure that you've enabled IMAP for yor gmail account - see https://support.google.com/mail/troubleshooter/1668960?hl=en )

Note1: The SMTP server hosting the mailbox you've configured above must support plus addressing i.e. any email sent to mountorangeschool+blahblahblah@besteveremail.com is still delivered to mountorangeschool@besteveremail.com.

Note2 : The username and password here must relate to the settings you entered earlier in Mailbox configuration. So if your address was mountorangeschool @ besteveremail.com and your username is mountorangeschool, then enter your username in this section along with the password you use to get into this email account.

Note 3: You may also need to make sure that your host does not block outbound connections to the IMAP ports (some do by default).

Note 4: If using gmail, you may find that IMAP does not work with Google's higher security setting. If IMAP is not working with gmail, check out https://support.google.com/accounts/answer/6010255?hl=en-GB


Message handlers


Email to Private files


Invalid recipient handler

If a valid message is received but the sender cannot be authenticated, the message is stored on the email server and the user is contacted using the email address in their user profile. The user is given the chance to reply to confirm the authenticity of the original message.This handler processes those replies.

It is not possible to disable sender verification of this handler because the user may reply from an incorrect email address if their email client configuration is incorrect.


Reply to forum posts


See also


Email notification

Enabling Email notifications may require an addition plugin.