X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fmail.php;h=da22eb6715a1b2c333ae0cf60f6271f513e373f5;hb=57163e6fd69d560b462a1b9eaee054126e029703;hp=2076476f875c54c6171eb05777a4072024f89a88;hpb=3251ef3b518ef9db55fbab0693d8b0f654dcda58;p=quix0rs-gnu-social.git diff --git a/lib/mail.php b/lib/mail.php index 2076476f87..da22eb6715 100644 --- a/lib/mail.php +++ b/lib/mail.php @@ -52,7 +52,7 @@ function mail_backend() $backend = $mail->factory(common_config('mail', 'backend'), common_config('mail', 'params') ?: array()); if ($_PEAR->isError($backend)) { - throw new ServerException($backend->getMessage()); + throw new EmailException($backend->getMessage(), $backend->getCode()); } } return $backend; @@ -82,7 +82,7 @@ function mail_send($recipients, $headers, $body) assert($backend); // throws an error if it's bad $sent = $backend->send($recipients, $headers, $body); if ($_PEAR->isError($sent)) { - throw new ServerException($sent->getMessage()); + throw new EmailException($sent->getMessage(), $sent->getCode()); } return true; } catch (PEAR_Exception $e) {