only log sent mail if _LOG_SENT_MAIL is set

This commit is contained in:
Andrew Dolgov 2019-03-06 08:55:10 +03:00
parent dfd3a4e581
commit 6d0c9bb784
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ class Mailer {
$from_combined = $from_name ? "$from_name <$from_address>" : $from_address;
$to_combined = $to_name ? "$to_name <$to_address>" : $to_address;
if (defined('_LOG_SENT_MAIL') && _LOG_SENT_MAIL)
Logger::get()->log("Sending mail from $from_combined to $to_combined <$to_address> [$subject]: $message");
// HOOK_SEND_MAIL plugin instructions: