MantisBT: master-1.2.x 42a6aa36

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2013-01-17 06:57 master-1.2.x 5b2116d4
Affected Issues  0015382: Additional improvements to email logging
Changeset

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

mod - core/email_api.php Diff File