mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
move reset-call of smtp to phpmailer class, as it is the one that throws exceptions, and stops action
This commit is contained in:
parent
d2a851931f
commit
a7be5a026e
@ -774,6 +774,7 @@ class PHPMailer {
|
||||
}
|
||||
$smtp_from = ($this->Sender == '') ? $this->From : $this->Sender;
|
||||
if(!$this->smtp->Mail($smtp_from)) {
|
||||
$this->smtp->Reset();
|
||||
throw new phpmailerException($this->Lang('from_failed') . $smtp_from, self::STOP_CRITICAL);
|
||||
}
|
||||
|
||||
@ -818,9 +819,11 @@ class PHPMailer {
|
||||
|
||||
if (count($bad_rcpt) > 0 ) { //Create error message for any bad addresses
|
||||
$badaddresses = implode(', ', $bad_rcpt);
|
||||
$this->smtp->Reset();
|
||||
throw new phpmailerException($this->Lang('recipients_failed') . $badaddresses);
|
||||
}
|
||||
if(!$this->smtp->Data($header . $body)) {
|
||||
$this->smtp->Reset();
|
||||
throw new phpmailerException($this->Lang('data_not_accepted'), self::STOP_CRITICAL);
|
||||
}
|
||||
if($this->SMTPKeepAlive == true) {
|
||||
|
@ -576,7 +576,6 @@ class SMTP {
|
||||
}
|
||||
|
||||
if($code != 250) {
|
||||
$this->Reset();
|
||||
$this->error =
|
||||
array("error" => "MAIL not accepted from server",
|
||||
"smtp_code" => $code,
|
||||
@ -672,7 +671,6 @@ class SMTP {
|
||||
}
|
||||
|
||||
if($code != 250 && $code != 251) {
|
||||
$this->Reset();
|
||||
$this->error =
|
||||
array("error" => "RCPT not accepted from server",
|
||||
"smtp_code" => $code,
|
||||
|
Loading…
Reference in New Issue
Block a user