Skip to content

Commit

Permalink
Add more information to error message (#246)
Browse files Browse the repository at this point in the history
* Add more information to error message

* fix review hints

Co-authored-by: Ingolf Steinhardt <git@e-spin.de>
  • Loading branch information
zonky2 and e-spin committed Nov 16, 2021
1 parent 863b638 commit 18f4145
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/NotificationCenter/Gateway/Email.php
Expand Up @@ -110,7 +110,7 @@ public function sendDraft(EmailMessageDraft $objDraft)
try {
$objEmail->replyTo($strReplyTo);
} catch (\Exception $e) {
\System::log(sprintf('Could not send email for message ID %s: %s', $objDraft->getMessage()->id, $e->getMessage()), __METHOD__, TL_ERROR);
\System::log(sprintf('Could not set reply-to address "%s" for message ID %s: %s', $strReplyTo, $objDraft->getMessage()->id, $e->getMessage()), __METHOD__, TL_ERROR);
return false;
}
}
Expand Down Expand Up @@ -161,7 +161,7 @@ public function sendDraft(EmailMessageDraft $objDraft)
try {
return $objEmail->sendTo($objDraft->getRecipientEmails());
} catch (\Exception $e) {
\System::log(sprintf('Could not send email for message ID %s: %s', $objDraft->getMessage()->id, $e->getMessage()), __METHOD__, TL_ERROR);
\System::log(sprintf('Could not send email to "%s" for message ID %s: %s', implode(', ', $objDraft->getRecipientEmails()), $objDraft->getMessage()->id, $e->getMessage()), __METHOD__, TL_ERROR);
}

return false;
Expand Down

0 comments on commit 18f4145

Please sign in to comment.