If you have been using Moodle for as long as I have, you would also know the pain of various emails sent from Moodle not being delivered to the end user.
Moodle sends (can send) out the following emails:
- Welcome emails to users
- Password reset emails to users
- Forum notifications
- Messages sent to users
- self-enrolment in Moodle and many more..
If you’ve just been using the default SMTP server that comes with your hosting, you know its not easy to debug if the recipient does not receive an email. Luckily we can use a service like mailgun, which will allow you to track the delivery of emails and help you setup the emails the right way. If the number of emails that you send from Moodle is less than 10,000 a month, then you can utilise the free plan of mailgun which should be able to meet all the basic requirements plus a whole lot more.
To setup Mailgun with Moodle, setup a domain in Mailgun that you want to use and then follow the below mentioned steps in Moodle:
- Go to “Site administration”
- Go to “Plugins”
- Go to “Message outputs”
- Click on “Email”
- Then on the following page update the following settings:
- SMTP hosts: smtp.mailgun.org:465
- SMTP security: SSL
- SMTP auth type: LOGIN
- SMTP username: Mailgun domain username (e.g. postmaster@<yourmailgundomain>)
- SMTP password: Mailgun domain password
That should be it, you should now be able to track your Moodle emails through mailgun’s log feature.
With thanks! Valuable information!