From 6d0c9bb7846cee46ccdefae8b040e1981c826b68 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 6 Mar 2019 08:55:10 +0300 Subject: [PATCH] only log sent mail if _LOG_SENT_MAIL is set --- classes/mailer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/mailer.php b/classes/mailer.php index fbdf111a7..eea9f5ff6 100644 --- a/classes/mailer.php +++ b/classes/mailer.php @@ -19,7 +19,8 @@ class Mailer { $from_combined = $from_name ? "$from_name <$from_address>" : $from_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: // 1. return 1 or true if mail is handled