Details
-
Improvement
-
Status: Development in progress
-
Minor
-
Resolution: Unresolved
-
2.7.10, 2.8.8, 2.9.2, 3.0
-
None
-
MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
-
MDL-51727_master
Description
Currently, if you want to debug smtp mail sending, you need to enable the debugsmtp setting.
However, this simply makes phpmailer echo it's debug messages.
To actually be able to read those error messages, you need to enable "display debug messages" and set the "debug messages" setting to NORMAL or higher, so that the page does not immediately redirect after the messages are shown.
Now, ideally, we should be able to log those messages someplace instead of seeing them on the screen. For example when a problem is seen on a production server, that can not be reproduced on a test server. phpmailer has a "Debugoutput" variable, which allows specifying what happens with it's debug messages. The default value is "echo". However, it can also be set to "error_log", in which case it will use php's error log function.
Shouldn't Moodle expose this functionality? I'd imagine it working like this:
if ($CFG->debugsmtp) {
|
if (empty($CFG->debugdisplay)) {
|
$mailer->Debugoutput = "error_log";
|
}
|
}
|
Attachments
Issue Links
- has a non-specific relationship to
-
MDL-57040 Message output breaks when Debug email sending is enabled.
-
- Closed
-
-
MDL-13745 Test Email Button in Mail Settings
-
- Closed
-
-
MDL-53255 Refactor moodelib email functions into Message API or email message output
-
- Closed
-
- has been marked as being related by
-
MDL-53314 Add IMAP debugging config item
-
- Closed
-
- will help resolve
-
MDL-53880 "processing" icon being displayed endlessly
-
- Closed
-