Giter VIP home page Giter VIP logo

michael-milette / moodle-local_mailtest Goto Github PK

View Code? Open in Web Editor NEW
19.0 7.0 12.0 136 KB

Moodle MailTest 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. For premium support, contact us at https://www.tngconsulting.ca/contact

Home Page: https://moodle.org/plugins/local_mailtest

License: GNU General Public License v3.0

PHP 100.00%
hacktoberfest moodle moodle-plugin moodle-local

moodle-local_mailtest's People

Contributors

danowar2k avatar michael-milette avatar michaelmeneses avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-local_mailtest's Issues

PHP 7.1 Support

I noticed in your readme that php7 support was unconfirmed.

I can confirm that this plugin works with PHP 7.1 in 3.2.2+ (Build: 20170421).

Feel free to close when you receive this.

Feature Request: Improvements for "Connection Failed"

Prerequisites

  • I am requesting the new feature to the correct repository.
  • I checked the latest version on GitHub and the README.md documentation to ensure that this functionality does not already exist.
  • I searched to make sure that this feature has not already been requested.
  • I have, or I know someone who has, the ability and willingness to test the new feature on a Moodle LMS-based site.
  • I agree to submit one feature request per issue ticket (do not submit multiple requests in one issue ticket).
  • I understand that development and support is provided by volunteer(s) and that all final implementation decisions are up TNG Consulting Inc.

Feature Request - The User Story

David McNab suggested the following on 2023-08-12 at 17:19

Hi Michael, thanks for your efforts in maintaining the eMail Test plugin.

I had a struggle getting Moodle's inbuilt SMTP client working with my mail server, and wasn't able to get much feedback from eMail Test, apart from "Connection Failed". I had to tail the server logs, and even stage a simulated server, to see what was going wrong.

There are numerous factors which can cause the "Connection Failed". Some are:

(i) DNS lookup failure
(ii) server's port is closed
(iii) connectivity barrier such as ISP blocking outbound SMTP connections
(iv) SSL certificate non-verifiable (eg self-signed)
(v) SSL certificate invalid (eg required domain not included),
(vi) SSL certificate expired.
(vii) I also noticed the client disconnects if the 220 greeting from the server mentions a different domain name to the one configured into the Moodle client.

I don't know how much time/interest you have available for improving the eMail Test plugin, but anything you could add to shine more light on connection failures would be a big boost to users if they get stuck. It's even possible for the plugin to execute lower-level commands such as 'openssl s_client -connect mail.myserver.com:25 -starttls smtp' to drill down into certificate issues.

Other opportunities for adding value to the eMail Test plugin could be some logic to automatically attempt several permutations of ports, security methods and login methods, to seek a permutation that works. That, and the ability to configure Moodle to accept self-signed certificates case by case.

Just some thoughts anyway. I know you're probably busy so it's understandable if it's difficult to prioritise work on eMail Test. I'd probably volunteer to help out on it myself, but I'm more of a Python specialist and under the pump myself with my own projects.

Cheers
David

Screenshots / Mock-ups

No response

Alterative you have considered

No response

Additional information

No response

Planning on submitting a solution in a pull request (PR)?

Yes

Code of Conduct

Add bulk email test

Hi Michael,

Would you consider adding a new feature to send bulk emails through a server? I am attempting to do some load tests through our SMTP server to make sure we aren't getting rate limited and having a bulk option would be great.

error 404

Hi,
I installed the plugin on a Moodle Moodle 3.11.5 (Build: 20220117)
When I run admin/sever/email/ eMail Test
I have this page :-(

Not Found

The requested URL was not found on this server.

same result with

  • from moodle plugin database
  • from this git repo

Could you help me ?

From address left empty on test email

I am trying to send a test email, but the "From" is left empty. This causes the email to fail. I have chosen our no-reply email for the "From" from the first step, but it isn't being used. Is this a bug with the plugin or something in Moodle?

2017-02-15 13:35:16 SERVER -> CLIENT: 354 Start mail input; end with .
2017-02-15 13:35:16 CLIENT -> SERVER: Date: Wed, 15 Feb 2017 08:35:12 -0500
2017-02-15 13:35:16 CLIENT -> SERVER: To: [email protected]
2017-02-15 13:35:16 CLIENT -> SERVER: From: ""
2017-02-15 13:35:16 CLIENT -> SERVER: Subject: Test Email

Error core_plugin / err_removing_unknown_plugin and 502

Hi,

After installation in the mailTest plugin compatible with a version of Moodle 3.0 in production. An installation error occurred and was promptly removed, but ... (core_plugin / err_removing_unknown_plugin) and when we try to access moodle, mainly on the plugin overview page, it presents the following errors.
Example:
**An error 502 occurred:
The proxy server received an invalid response from an upstream server.
The proxy server was unable to handle the GET request /moodle/admin/index.php.

Reason: Error reading from remote server

Apache / 2.4.7 server (Ubuntu) at www.xxxx.xxxx.xxx.xxx.br Port 80**

After this error, ADMIN access to Moodle is unstable. Any idea what it might be?

I didn't find any error similar reports using the plugin so I found it interesting to post here and check if help is possible.

Thank You!

Bug: PHP 8.1 - Constant FILTER_SANITIZE_STRING is deprecated in local/mailtest/locallib.php

Prerequisites

  • I'm reporting the issue to the correct repository.
  • I am running the latest version of this plugin (if not, please upgrade first).
  • I checked the README.md and Wiki documentation but did not find my answer.
  • I searched to make sure that this issue had not already been reported.
  • I have, or I know someone who has, the ability and willingness to test the fix on a Moodle LMS-based site.
  • I am submitting no more than one bug report per issue ticket (please do not submit multiple bugs in one issue ticket).
  • I understand that support is provided by volunteer(s).

What happened?

When I navigate to Site Administration > Server > Email Test, I get the following error message:

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in <b>local/mailtest/locallib.php on line 42

What do you think should have happened?

I expected there to be no deprecation notice.

Steps to reproduce

  1. Login as a Site Administrator
  2. Go to Site Administration > Server > Email Test

Screenshots

No response

Moodle version

Moodle 4.2

Installed Moodle UI Language packs.

  • English only
  • One or more other languages/regional dialects (specify below)
  • Other

If other language(s), please specify

No response

Workaround

No response

Additional information

No response

System information

Server PHP: 8.1

Code of Conduct

eMail Test working but Cron task not sending Forum mails

eMail Test is working fine. But Forum emails are not being sent.
Cron task runs, but emails are just queued and not send.
Does eMail Test covers mod_forum\task\cron_task or is it another mailing procedure?

Thank you

Note: Moodle 3.7.1+ (Build: 20190801)

Request: Add git tags for older versions

Hi, would you be so kind to add tags for older releases on Github?

For example, we have the 1.2.1 version running locally and are looking to update to 1.4.0, so we try to compare the two releases by tags on Github. But only the 1.4.0 tag is present.

Here's the command with which you could add the tag for the 1.2.1 commit, for example...

git tag -a "v1.2.1" 8389708abca355f46ad9e28679415488fb07c88f -m "OPTIONAL_ADDITIONAL_INFO"

Error in Moodle 2.4 to 3.9: Missing divertallemails string

Invalid get_string() identifier: 'divertallemails' or component 'local_mailtest'. Perhaps you are missing $string['divertallemails'] = ''; in /local/mailtest/lang/en/local_mailtest.php?
line 353 of /lib/classes/string_manager_standard.php: call to debugging()
line 7401 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 144 of /local/mailtest/classes/mailtest_form.php: call to get_string()
line 214 of /lib/formslib.php: call to mailtest_form->definition()
line 84 of /local/mailtest/index.php: call to moodleform->__construct()

Installation aborted due to validation failure

Is this now failing due to the GDPR privacy plugin?


Validating local_mailtest ... Error
  [Error] Write access check [/var/www/html/local] 
Installation aborted due to validation failure

Uses deprecated textlib static method

According to lib/upgrade.txt, all the textlib::* calls should be replaced with core_text::* since Moodle 2.6. If you want to maintain a single branch of the plugin, you may wish to use something like this in your index.php (not tested):

if ($CFG->branch >= 26) {
    $toemail = core_text::strtolower($data->recipient);
} else {
    $toemail = textlib::strtolower($data->recipient);
}

Because of the textlib, the plugin fails to work in recent Moodle 2.9 (I am aware that it is not declared as a supported version yet. I tried it out just for curiosity):

Fatal error: Class 'textlib' not found in local/mailtest/index.php on line 90

Please make version.php plain data only

Things like $plugin->release = '0.1 (Build: '.$plugin->version.')'; are not good in version.php. There are tools that parse the file as plain data, without actual PHP processing. You could easily end up with unexpected release recorded.

I would even recommend not to repeat the plugin version. Use plain "0.1" etc for the release info.

[BUG] Notice: Undefined property: stdClass::$branch in /local/mailtest/settings.php

Prerequisites

  • I'm reporting the issue to the correct repository.
  • I am running the latest version of this plugin (if not, please upgrade first).
  • I checked the README.md and Wiki documentation but found no answer.
  • I searched to make sure that this issue has not already been reported.
  • I have, or I know someone who has, the ability and willingness to test the fix on a Moodle LMS-based site.
  • I agree to submit one bug report per issue ticket (do not submit multiple bugs in one issue ticket).
  • I understand that support is provided by volunteer(s).

What happened?

I get the following in Moodle if the eMailTest plugin files are copied into place before initial Moodle installation and debugging is enabled:

Notice: Undefined property: stdClass::$branch in /local/mailtest/settings.php on line 29

What do you think should have happened?

The case where the $CFG->branch variable has yet to be defined should have been handled better.

Steps to reproduce

  1. Complete the normal installation steps to creating a Moodle site.
  2. During the installation, you will see the following error:

Notice: Undefined property: stdClass::$branch in /local/mailtest/settings.php on line 29

Screenshots

No response

Moodle version

3.11.7

Installed Moodle UI Language packs.

  • English only

Code of Conduct

[1.4.0] Bug: "Notice: Undefined variable: cronoverdue in /moodle/application/htdocs/moodle/eval/local/mailtest/index.php on line 124"

Just tested 1.4.0 in my test installation.

In this line:

if ($cronoverdue) { // Cron is overdue.

Likely due to the fact that $cronoverdue is only defined in the if-scope

$cronoverdue = ($lastcron < time() - 3600 * 24);
and not in the else-scope (
if ($CFG->branch >= 27) { // Moodle 2.7+.
$sql = 'SELECT MAX(lastruntime) FROM {task_scheduled}';
} else {
$sql = 'SELECT MAX(lastcron) FROM {modules}';
}
$lastcron = $DB->get_field_sql($sql);
if ($cronoverdue) { // Cron is overdue.
).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.