From f7eb14a9faa4a0799ec02f639572c8e3cfd1c01f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 28 Jun 2022 08:57:03 +0200 Subject: Extend email logging Signed-off-by: Joas Schilling --- lib/private/Mail/Mailer.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php index 2f3480498be..991d1b202ec 100644 --- a/lib/private/Mail/Mailer.php +++ b/lib/private/Mail/Mailer.php @@ -196,6 +196,9 @@ class Mailer implements IMailer { // Debugging logging $logMessage = sprintf('Sent mail to "%s" with subject "%s"', print_r($message->getTo(), true), $message->getSubject()); + if (!empty($failedRecipients)) { + $logMessage .= sprintf(' (failed for "%s")', print_r($failedRecipients, true)); + } $this->logger->debug($logMessage, ['app' => 'core']); if ($debugMode && isset($mailLogger)) { $this->logger->debug($mailLogger->dump(), ['app' => 'core']); -- cgit v1.2.3