mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
play around with catching the smtp error of smtp class, as it is the one that has the info about the error
This commit is contained in:
parent
a7be5a026e
commit
27149b237f
@ -774,8 +774,9 @@ class PHPMailer {
|
||||
}
|
||||
$smtp_from = ($this->Sender == '') ? $this->From : $this->Sender;
|
||||
if(!$this->smtp->Mail($smtp_from)) {
|
||||
$this->SetError($this->Lang('from_failed') . $smtp_from);
|
||||
$this->smtp->Reset();
|
||||
throw new phpmailerException($this->Lang('from_failed') . $smtp_from, self::STOP_CRITICAL);
|
||||
throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL);
|
||||
}
|
||||
|
||||
// Attempt to send attach all recipients
|
||||
@ -819,12 +820,14 @@ class PHPMailer {
|
||||
|
||||
if (count($bad_rcpt) > 0 ) { //Create error message for any bad addresses
|
||||
$badaddresses = implode(', ', $bad_rcpt);
|
||||
$this->setError($this->Lang('recipients_failed') . $badaddresses);
|
||||
$this->smtp->Reset();
|
||||
throw new phpmailerException($this->Lang('recipients_failed') . $badaddresses);
|
||||
throw new phpmailerException($this->ErrorInfo);
|
||||
}
|
||||
if(!$this->smtp->Data($header . $body)) {
|
||||
$this->setError($this->Lang('data_not_accepted'));
|
||||
$this->smtp->Reset();
|
||||
throw new phpmailerException($this->Lang('data_not_accepted'), self::STOP_CRITICAL);
|
||||
throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL);
|
||||
}
|
||||
if($this->SMTPKeepAlive == true) {
|
||||
$this->smtp->Reset();
|
||||
|
Loading…
Reference in New Issue
Block a user