diff --git a/phpmailer/phpmailer.php b/phpmailer/phpmailer.php index 25b94047..84022f24 100644 --- a/phpmailer/phpmailer.php +++ b/phpmailer/phpmailer.php @@ -105,6 +105,6 @@ function phpmailer_emailer_send_prepare(App $a, IEmail &$email) $email = null; } } catch (Exception $e) { - DI::logger()->error('PHPMailer error', ['email' => $email, 'ErrorInfo' => $mailer->ErrorInfo, 'exception' => $e]); + DI::logger()->error('PHPMailer error', ['email' => $email, 'ErrorInfo' => $mailer->ErrorInfo, 'exception' => $e->__toString()]); } } diff --git a/securemail/securemail.php b/securemail/securemail.php index fb801a4c..3b6f5beb 100644 --- a/securemail/securemail.php +++ b/securemail/securemail.php @@ -142,6 +142,6 @@ function securemail_emailer_send_prepare(App &$a, IEmail &$email) $email = $email->withMessage($armored_encrypted, null); } catch (Exception $e) { - DI::logger()->warning('Encryption failed.', ['email' => $email, 'exception' => $e]); + DI::logger()->warning('Encryption failed.', ['email' => $email, 'exception' => $e->__toString()]); } }