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,7 +19,8 @@ class Mailer {
$from_combined = $from_name ? "$from_name <$from_address>" : $from_address; $from_combined = $from_name ? "$from_name <$from_address>" : $from_address;
$to_combined = $to_name ? "$to_name <$to_address>" : $to_address; $to_combined = $to_name ? "$to_name <$to_address>" : $to_address;
Logger::get()->log("Sending mail from $from_combined to $to_combined <$to_address> [$subject]: $message"); 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: // HOOK_SEND_MAIL plugin instructions:
// 1. return 1 or true if mail is handled // 1. return 1 or true if mail is handled