PHPMailer\PHPMailer
SMTP::setError()
Set error messages and codes.
Method of the class: SMTP{}
No Hooks.
Return
null
. Nothing (null).
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: ''
SMTP::setError() SMTP::setError code WP 6.6.2
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, ]; }