Merge pull request #140 from Synchro/master
Delay throwing of bad recipients exception, fixes #139
This commit is contained in:
commit
0962b82b77
|
|
@ -1218,9 +1218,6 @@ class PHPMailer
|
|||
$this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body, $this->From);
|
||||
}
|
||||
|
||||
if (count($bad_rcpt) > 0) { //Create error message for any bad addresses
|
||||
throw new phpmailerException($this->lang('recipients_failed') . implode(', ', $bad_rcpt));
|
||||
}
|
||||
if (!$this->smtp->data($header . $body)) {
|
||||
throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL);
|
||||
}
|
||||
|
|
@ -1230,6 +1227,12 @@ class PHPMailer
|
|||
$this->smtp->quit();
|
||||
$this->smtp->close();
|
||||
}
|
||||
if (count($bad_rcpt) > 0) { //Create error message for any bad addresses
|
||||
throw new phpmailerException(
|
||||
$this->lang('recipients_failed') . implode(', ', $bad_rcpt),
|
||||
self::STOP_CONTINUE
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue