function SMTP::errorHandler

5.x SMTP.php protected SMTP::errorHandler($errno, $errmsg, $errfile = '', $errline = 0)

Reports an error number and string.

Parameters

int $errno The error number returned by PHP:

string $errmsg The error message returned by PHP:

string $errfile The file the error occurred in:

int $errline The line number the error occurred on:

File

inc/PHPMailer/src/SMTP.php, line 1292

Class

SMTP
PHPMailer RFC821 SMTP email transport class. Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server.

Code

protected function errorHandler($errno, $errmsg, $errfile = '', $errline = 0) {
  $notice = 'Connection failed.';
  $this->setError($notice, $errmsg, (string) $errno);
  $this->edebug("$notice Error #$errno: $errmsg [$errfile line $errline]", self::DEBUG_CONNECTION);
}