PHPMailer\PHPMailer
PHPMailer::getSmtpErrorMessage()
Build an error message starting with a generic one and adding details if possible.
Method of the class: PHPMailer{}
No Hooks.
Return
String
.
Usage
// private - for code of main (parent) class only $result = $this->getSmtpErrorMessage( $base_key );
- $base_key(string) (required)
- -
PHPMailer::getSmtpErrorMessage() PHPMailer::getSmtpErrorMessage code WP 6.6.2
private function getSmtpErrorMessage($base_key) { $message = $this->lang($base_key); $error = $this->smtp->getError(); if (!empty($error['error'])) { $message .= ' ' . $error['error']; if (!empty($error['detail'])) { $message .= ' ' . $error['detail']; } } return $message; }