PHPackages                             michael-milette/moodle-local\_mailtest - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. michael-milette/moodle-local\_mailtest

ActiveMoodle-local

michael-milette/moodle-local\_mailtest
======================================

eMailTest is a Moodle local plugin that can help diagnose SMTP email connectivity issues.

v3.1.7(11mo ago)191.3k↓100%12GPL-3.0+PHPCI failing

Since May 23Pushed 11mo ago5 watchersCompare

[ Source](https://github.com/michael-milette/moodle-local_mailtest)[ Packagist](https://packagist.org/packages/michael-milette/moodle-local_mailtest)[ RSS](/packages/michael-milette-moodle-local-mailtest/feed)WikiDiscussions master Synced today

READMEChangelog (9)Dependencies (1)Versions (14)Used By (0)

[![](pix/logo.png)](pix/logo.png)

Local eMailTest plugin for Moodle
=================================

[](#local-emailtest-plugin-for-moodle)

[![PHP](https://camo.githubusercontent.com/e952abbfc6ef868b338cbf329ac697b326d8a3be5e124d66505f713f48946240/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d76352e36253230746f253230382e332d626c75652e737667)](https://camo.githubusercontent.com/e952abbfc6ef868b338cbf329ac697b326d8a3be5e124d66505f713f48946240/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d76352e36253230746f253230382e332d626c75652e737667)[![Moodle](https://camo.githubusercontent.com/58745831378a9f6e0b12bc7a2a6a3a4e2b0809076f1d06d5cb09ea5d960538a1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6f6f646c652d76322e35253230746f25323076342e352d6f72616e67652e737667)](https://camo.githubusercontent.com/58745831378a9f6e0b12bc7a2a6a3a4e2b0809076f1d06d5cb09ea5d960538a1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6f6f646c652d76322e35253230746f25323076342e352d6f72616e67652e737667)[![GitHub Issues](https://camo.githubusercontent.com/584fa01c9f7e5f6b6d8893db77377c7c21bf658a86644e6ca4229f5e8637eb4e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6d69636861656c2d6d696c657474652f6d6f6f646c652d6c6f63616c5f6d61696c746573742e737667)](https://github.com/michael-milette/moodle-local_mailtest/issues)[![Contributions welcome](https://camo.githubusercontent.com/d36745df8a6a62e0aa3eac455d2563d6049bde3683dc6f6f21af87f1561bb8c4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6e747269627574696f6e732d77656c636f6d652d677265656e2e737667)](#contributing)[![License](https://camo.githubusercontent.com/1b0c7e4911720d0444c16a1ffd145a039f14a1a7305362ab51184f757a4dd6bc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c25323076332d626c75652e737667)](#license)

Table of Contents
=================

[](#table-of-contents)

- [Basic Overview](#basic-overview)
- [Requirements](#requirements)
- [Download eMail Test for Moodle](#download-email-test-for-moodle)
- [Installation](#installation)
- [Usage](#usage)
- [Updating](#updating)
- [Uninstallation](#uninstallation)
- [Limitations](#limitations)
- [Language Support](#language-support)
- [Frequently Asked Questions (FAQ)](#faq)
- [Contributing](#contributing)
- [Motivation for this plugin](#motivation-for-this-plugin)
- [Further information](#further-information)
- [License](#license)

Basic Overview
==============

[](#basic-overview)

The eMailTest module for Moodle allows administrators to test Moodle's email system. A trace of the SMTP dialogue will be displayed if the email message cannot be sent for any reason.

Once the test email has been sent, you will need to check your email in-box to confirm that the email message was successfully delivered. This plugin will not do that for you.

[(Back to top)](#table-of-contents)

Requirements
============

[](#requirements)

This plugin requires Moodle 2.5+, 3.x+, 4.x+ or 5.x+ from

[(Back to top)](#table-of-contents)

Download eMail Test for Moodle
==============================

[](#download-email-test-for-moodle)

The most recent STABLE release of eMail Test for Moodle is available from: [https://moodle.org/plugins/local\_mailtest](https://moodle.org/plugins/local_mailtest)

The most development release can be found at: [https://github.com/michael-milette/moodle-local\_mailtest](https://github.com/michael-milette/moodle-local_mailtest)

[(Back to top)](#table-of-contents)

Installation
============

[](#installation)

Install the plugin, like any other plugin, to the following folder:

```
/local/mailtest

```

See [https://docs.moodle.org/en/Installing\_plugins](https://docs.moodle.org/en/Installing_plugins) for details on installing Moodle plugins.

There are no special considerations required for updating the plugin.

[(Back to top)](#table-of-contents)

Usage
=====

[](#usage)

There are no configurable settings for this plugin at this time.

The local\_mailtest plugin is designed allow administrators to test Moodle to ensure the email message system is correctly configured.

Once installed, login as a Moodle administrator and then click:

```
Home > Site Administration > Server > eMail Test

```

Enter the email address of the recipient where you want to send the message and click the \[Send a test message\] button.

If the email message was successfully sent by Moodle, you will see a message that says "Success - The test message was successfully delivered to the SMTP server.". If it fails to send the email, a dialogue between the Moodle and the SMTP server will be displayed.

[(Back to top)](#table-of-contents)

Updating
========

[](#updating)

There are no special considerations required for updating the plugin.

The first public BETA version was released on 2015-11-01. This plugin is now considered STABLE.

For more information on releases since then, see [CHANGELOG.md](https://github.com/michael-milette/moodle-local_mailtest/blob/master/CHANGELOG.md).

[(Back to top)](#table-of-contents)

Uninstallation
==============

[](#uninstallation)

Uninstalling the plugin by going into the following:

Home &gt; Administration &gt; Site Administration &gt; Plugins &gt; Manage plugins &gt; eMail Test

...and click Uninstall. You may also need to manually delete the following folder:

```
/local/mailtest

```

[(Back to top)](#table-of-contents)

Limitations
===========

[](#limitations)

There are no known limitations at this time.

[(Back to top)](#table-of-contents)

Language Support
================

[](#language-support)

This plugin includes support for the English language. Additional languages including French are supported if you've installed one or more additional Moodle language packs.

If you need a different language that is not yet supported, please feel free to contribute using the Moodle AMOS Translation Toolkit for Moodle at

This plugin has not been tested for right-to-left (RTL) language support. If you want to use this plugin with a RTL language and it doesn't work as-is, feel free to prepare a pull request and submit it to the project page at:

[https://github.com/michael-milette/moodle-local\_mailtest](https://github.com/michael-milette/moodle-local_mailtest)

[(Back to top)](#table-of-contents)

FAQ
===

[](#faq)

Frequently Asked Questions
--------------------------

[](#frequently-asked-questions)

### Why do I get a 500 server error when I use eMailTest?

[](#why-do-i-get-a-500-server-error-when-i-use-emailtest)

This plugin has been extensively tested and used on hundreds of sites. If you are getting this error, it is likely that you have a file owner/group permissions issue on your server which needs to be resolved.

### Why does it say that Moodle sent the test message successfully yet I did not receive the email?

[](#why-does-it-say-that-moodle-sent-the-test-message-successfully-yet-i-did-not-receive-the-email)

This could be due to a number of reasons including but not limited to:

- Incorrect PHP Mail settings in your php.ini file (if you have not configured Moodle's SMTP settings).
- You may have an anti-virus or firewall blocking email communications.
- The mail server receiving your email may be discarding emails received from your site.
- The test email may be blocked by anti-spam filters. Check your junk mail folder.

### How do I find out the correct email settings I should be using?

[](#how-do-i-find-out-the-correct-email-settings-i-should-be-using)

Contact your network administrator or your web hosting provider. These are typically the same settings as you would use for an email client but the administrator may need to add special settings to allow emails to be sent from your `support` and `no-reply` email addresses.

### Why is the test emails not being sent successfully?

[](#why-is-the-test-emails-not-being-sent-successfully)

Your SMTP email settings are incorrect or the mail server is refusing emails coming from your Moodle site. Read the whole communications dialogue that is displayed when you send a test message. It will often provide some hint of where the problem might be.

### What is the difference between PHP Mail and Moodle SMTP Mail?

[](#what-is-the-difference-between-php-mail-and-moodle-smtp-mail)

If you don't configure the mail settings in Moodle, Moodle will hand off the delivery of email to PHP's built-in mail system. Its settings are typically in your server's PHP.INI file. If you do configure the SMTP settings in Moodle, it will attempt to deliver emails directly to the local SMTP server.

### How can I use this tool to send emails from other email addresses?

[](#how-can-i-use-this-tool-to-send-emails-from-other-email-addresses)

You can't. This is to prevent the tool from being used to send spam. If you really must, you can temporarily test the email address of one of the following "From" addresses:

- Your user account
- Support
- No-reply
- Primary admin

### My email used to work in Moodle previous to 3.2. After upgrading to Moodle 3.2 or later, why can't my site send emails?

[](#my-email-used-to-work-in-moodle-previous-to-32-after-upgrading-to-moodle-32-or-later-why-cant-my-site-send-emails)

As of Moodle 3.2, use of the no-reply email address is no longer optional in many cases. You will need to make sure it is now configured correctly. Some mail server may even only permit connections if this is actually a valid email address.

### Why do I see a message about cron not having run for at least 24 hours?

[](#why-do-i-see-a-message-about-cron-not-having-run-for-at-least-24-hours)

IMPORTANT - See  . If a link is included within the message, clicking it will cause Moodle to try sending queued messages immediately. However, future message will still not be sent automatically. Clicking the link instead of configuring cron will just hide the notice for 24 hours after which it will return until you fix this issue.

If for some reason you are unable to setup an automated cron job and don't see the link, you can enable the link and allow remote running of the cron job by going to Site administration &gt;Security &gt; Site Policies and unchecking **Cron execution via command line only**. For a little extra security, also set a **Cron password for remote access**.

### Why do I see some debugging code in the communications log even though debugging is turned off?

[](#why-do-i-see-some-debugging-code-in-the-communications-log-even-though-debugging-is-turned-off)

Moodle does some validation before sending an email and can display some useful information so we've enabled some minimal display of debugging information. Informative lines start with **email\_to\_user**. You can ignore the line number references that follow the information line.

### Regardless of which "from" email address I use, the test email always arrives from the same email address. Why?

[](#regardless-of-which-from-email-address-i-use-the-test-email-always-arrives-from-the-same-email-address-why)

This is likely a setting in your mail server. To confirm which email address was used to send the email, look at the bottom of the status message after you try to send the email. If the test email was successfully delivered, you can also try to reply to the test message and take a look at the To email address. There is no need to actually send the reply.

### I am not sure if the problem is with Moodle, my mail server or my firewall. What should I do?

[](#i-am-not-sure-if-the-problem-is-with-moodle-my-mail-server-or-my-firewall-what-should-i-do)

First, the problem is very unlikely to be Moodle. Moodle is used by organization in virtually every country of the world. If there was a problem, someone would have spoken up by now. That said, it could be your email settings. To find out if it is potentially your Moodle settings or firewall, or if it is you mail server, try setting Moodle up to use Gmail as your email server. If it works, it is very likely your email settings. If it doesn't, you might have a firewall blocking email traffic or your email server is incorrectly configured.

### How can I use Gmail to send SMTP emails from Moodle?

[](#how-can-i-use-gmail-to-send-smtp-emails-from-moodle)

Gmail requires that you create an [App Password](https://support.google.com/mail/answer/185833?hl=en) to send email for Moodle.

For more details as well as some of the limitations, see the Moodle documentation on [Email Setup Gmail](https://docs.moodle.org/en/Email_setup_gmail).-

### All the settings seem to be correct. What else can I try?

[](#all-the-settings-seem-to-be-correct-what-else-can-i-try)

Despite your best efforts, sometimes you will find that a :port Number needs to be added after the address of the SMTP server. Example: smtp.example.com:587

### Are there any security considerations?

[](#are-there-any-security-considerations)

Use of this plugin is restricted to Moodle Site Administrators and allows them to submit an email through a restricted web form that only they can access.

Other questions
---------------

[](#other-questions)

Got a burning question that is not covered here? If you still can't find your answer, submit your question in the Moodle forums or open a new issue on Github at:

[https://github.com/michael-milette/moodle-local\_mailtest/issues](https://github.com/michael-milette/moodle-local_mailtest/issues)

[(Back to top)](#table-of-contents)

Contributing
============

[](#contributing)

If you are interested in helping, please take a look at our [contributing](https://github.com/michael-milette/moodle-local_mailtest/blob/master/CONTRIBUTING.md) guidelines for details on our code of conduct and the process for submitting pull requests to us.

Contributors
------------

[](#contributors)

Michael Milette - Author and Lead Developer

Big thank you to the following contributors. (Please let me know if I forgot to include you in the list):

- laurentdavid: Fixed deprecated strings in Moodle 4.4 (2024).

Pending Features
----------------

[](#pending-features)

Let us know if you have any suggestions.

[(Back to top)](#table-of-contents)

Motivation for this plugin
==========================

[](#motivation-for-this-plugin)

The development of this plugin was motivated through our own experience in Moodle development and comments in the Moodle support forums and is supported by TNG Consulting Inc.

[(Back to top)](#table-of-contents)

Further information
===================

[](#further-information)

For further information regarding the local\_mailtest plugin, support or to report a bug, please visit the project page at:

[https://github.com/michael-milette/moodle-local\_mailtest](https://github.com/michael-milette/moodle-local_mailtest)

[(Back to top)](#table-of-contents)

License
=======

[](#license)

Copyright © 2015-2025 TNG Consulting Inc. -

This file is part of MailTest/eMailTest for Moodle -

eMailTest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

eMailTest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with eMailTest. If not, see .

[(Back to top)](#table-of-contents)

###  Health Score

42

↑

FairBetter than 90% of packages

Maintenance52

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~119 days

Recently: every ~91 days

Total

13

Last Release

330d ago

Major Versions

v1.4.0 → v2.0.02022-04-24

v2.0.2 → v3.0.02023-10-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/8fcd6e1de8d18a832bdd13671ea367b2dca9055995a6f8ce6739e68784bcbfc0?d=identicon)[michael-milette](/maintainers/michael-milette)

---

Top Contributors

[![michael-milette](https://avatars.githubusercontent.com/u/3808579?v=4)](https://github.com/michael-milette "michael-milette (62 commits)")[![michaelmeneses](https://avatars.githubusercontent.com/u/6410303?v=4)](https://github.com/michaelmeneses "michaelmeneses (2 commits)")[![danowar2k](https://avatars.githubusercontent.com/u/10991509?v=4)](https://github.com/danowar2k "danowar2k (1 commits)")[![laurentdavid](https://avatars.githubusercontent.com/u/4372386?v=4)](https://github.com/laurentdavid "laurentdavid (1 commits)")

---

Tags

hacktoberfestmoodlemoodle-localmoodle-plugin

### Embed Badge

![Health badge](/badges/michael-milette-moodle-local-mailtest/health.svg)

```
[![Health](https://phpackages.com/badges/michael-milette-moodle-local-mailtest/health.svg)](https://phpackages.com/packages/michael-milette-moodle-local-mailtest)
```

###  Alternatives

[silverstripe-themes/simple

The SilverStripe simple theme (default SilverStripe 3 theme)

411.3M8](/packages/silverstripe-themes-simple)[worksolutions/bitrix-reduce-migrations

Bitrix module for migrations

8615.6k](/packages/worksolutions-bitrix-reduce-migrations)[tinymighty/wiki-seo

A simple MediaWiki extension to give you control over the HTML title and meta tags via a tag or parser function.

174.2k](/packages/tinymighty-wiki-seo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
