PHPMailer\PHPMailer

SMTP::setError()protectedWP 1.0

Set error messages and codes.

{} It's a method of the class: SMTP{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->setError( $message, $detail, $smtp_code, $smtp_code_ex );
$message(string) (required)
The error message
$detail(string)
Further detail on the error
Default: ''
$smtp_code(string)
An associated SMTP error code
Default: ''
$smtp_code_ex(string)
Extended SMTP code
Default: ''

Code of SMTP::setError() WP 6.0

protected function setError($message, $detail = '', $smtp_code = '', $smtp_code_ex = '')
{
    $this->error = [
        'error' => $message,
        'detail' => $detail,
        'smtp_code' => $smtp_code,
        'smtp_code_ex' => $smtp_code_ex,
    ];
}