mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-22 21:30:54 +01:00
improve error handling on send, when invalid mailaddress is given
This commit is contained in:
parent
823e4c030e
commit
fb0dc8d5be
@ -989,7 +989,18 @@
|
||||
}
|
||||
catch(phpmailerException $e) {
|
||||
$this->errorInfo = $e->getMessage();
|
||||
#error_log($this->errorInfo);
|
||||
if ($mail->ErrorInfo) // use the complete mailer ErrorInfo, for full Information
|
||||
{
|
||||
if (stripos($mail->ErrorInfo, $this->errorInfo)===false)
|
||||
{
|
||||
$this->errorInfo = $mail->ErrorInfo.'<br>'.$this->errorInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errorInfo = $mail->ErrorInfo;
|
||||
}
|
||||
}
|
||||
error_log(__METHOD__.__LINE__.array2string($this->errorInfo));
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
@ -2035,7 +2035,7 @@ class PHPMailer {
|
||||
$msg .= '<p>' . $this->Lang('smtp_error') . $lasterror['smtp_msg'] . "</p>\n";
|
||||
}
|
||||
}
|
||||
$this->ErrorInfo = $msg;
|
||||
if (empty($this->ErrorInfo) || strpos($this->ErrorInfo,$msg)===false) $this->ErrorInfo .= (empty($this->ErrorInfo)?'':'<br>').$msg;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user