Prerequisites
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