PHPMailer\PHPMailer

SMTP::errorHandler()protectedWP 1.0

Reports an error number and string.

Method of the class: SMTP{}

No Hooks.

Return

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->errorHandler( $errno, $errmsg, $errfile, $errline );
$errno(int) (required)
The error number returned by PHP
$errmsg(string) (required)
The error message returned by PHP
$errfile(string)
The file the error occurred in
Default: ''
$errline(int)
The line number the error occurred on

SMTP::errorHandler() code WP 6.5.2

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
    );
}