Inheritance: extends Exception
Beispiel #1
0
 /**
  * Check the phpmailerException message and tell us if the exception should be treated as
  * a server error instead of a "critical" error.
  * Server error means that we can try to resend the email.
  */
 public function isServerError(\phpmailerException $e)
 {
     $serverErrorMessages = ['connect_host', 'data_not_accepted', 'smtp_connect_failed', 'execute'];
     foreach ($serverErrorMessages as $errorMessage) {
         if (strpos($e->getMessage(), $this->lang($errorMessage)) !== false) {
             return true;
         }
     }
     return false;
 }
Beispiel #2
0
 public function errorMessage()
 {
     return parent::errorMsg();
 }