View Issue Details

IDProjectCategoryView StatusLast Update
0015382mantisbtemailpublic2014-09-23 18:05
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.12 
Target Version1.2.13Fixed in Version1.2.13 
Summary0015382: Additional improvements to email logging
Description

Following a recent issue on mantisbt.org with the smtp server configuration, troubleshooting showed that the logging of e-mail sendings was not sufficient despite improvements already commited as part of 0014630.

Additional logging capturing all phpMailer exceptions including the full error message would make problem analysis much easier for the administrator.

TagsNo tags attached.

Relationships

related to 0014630 closeddregad Improve email logging 
related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

dregad

dregad

2013-01-17 07:21

developer   ~0034807

It would also be nice if send_emails.php command-line script would output more detailed information including errors to the screen when running.

grangeway

grangeway

2013-04-05 17:56

reporter   ~0036123

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master-1.2.x 42a6aa36

2013-01-17 06:57

dregad


Details Diff
Improve logging when sending e-mails

The email_api email_send() and email_send_all() functions have been
modified to provide a better log trace in case of errors.

A log entry is now printed in the following situations
- a message as already been sent
- the server is not responding and the batch sending is aborted
- whenever a phpMailer exception is thrown in email_send()

In addition, the log message gets the detailed error from phpMailer's
ErrorInfo property instead of the exception's getMessage(), as in some
cases (particularly when using PHPMAILER_METHOD_SMTP), the latter only
contains partial information instead of the full error text.

$t_emails_recipients_failed variable initialization has been removed as
it was not used in the code.

Fixes 0015382
Affected Issues
0015382
mod - core/email_api.php Diff File

MantisBT: master ad5f2f7f

2013-01-17 06:57

dregad


Details Diff
Improve logging when sending e-mails

The email_api email_send() and email_send_all() functions have been
modified to provide a better log trace in case of errors.

A log entry is now printed in the following situations
- a message as already been sent
- the server is not responding and the batch sending is aborted
- whenever a phpMailer exception is thrown in email_send()

In addition, the log message gets the detailed error from phpMailer's
ErrorInfo property instead of the exception's getMessage(), as in some
cases (particularly when using PHPMAILER_METHOD_SMTP), the latter only
contains partial information instead of the full error text.

$t_emails_recipients_failed variable initialization has been removed as
it was not used in the code.

Fixes 0015382
Affected Issues
0015382
mod - core/email_api.php Diff File

MantisBT: master-1.2.x 6302ae20

2013-01-17 07:16

dregad


Details Diff
Make log_event() calls print to stdout when running from CLI

This simple modification to the logging_api allows command-line scripts
such as send_emails.php to easily provide detailed information about
their operations, provided that the appropriate log_level is set in
config_inc.php.

This output can then be redirected to log files, etc.

Fixes 0015382
Affected Issues
0015382
mod - core/logging_api.php Diff File

MantisBT: master 0e2c6b46

2013-01-17 07:16

dregad


Details Diff
Make log_event() calls print to stdout when running from CLI

This simple modification to the logging_api allows command-line scripts
such as send_emails.php to easily provide detailed information about
their operations, provided that the appropriate log_level is set in
config_inc.php.

This output can then be redirected to log files, etc.

Fixes 0015382
Affected Issues
0015382
mod - core/logging_api.php Diff File