Skip to content

Commit

Permalink
Catch bad recipients rejected by SMTP server and report to the user
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Dec 29, 2014
1 parent ad3bdfb commit 8cddeb7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions imp/lib/Compose.php
Expand Up @@ -2484,6 +2484,17 @@ public function sendRedirectMessage($to, $log = true)

if (($prev = $e->getPrevious()) &&
($prev instanceof Horde_Smtp_Exception)) {
if ($prev instanceof Horde_Smtp_Exception_Recipients) {
$e2 = new IMP_Compose_Exception_Addresses($e);
foreach ($prev->recipients as $val) {
$e2->addAddress(
new Horde_Mail_Rfc822_Address($val),
_("Address rejected by the sending mail server."),
$e2::BAD
);
}
}

Horde::log(
sprintf(
"SMTP Error: %s (%u; %s)",
Expand Down

0 comments on commit 8cddeb7

Please sign in to comment.