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.
Returns
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 7.0
private function getSmtpErrorMessage($base_key)
{
$message = self::lang($base_key);
$error = $this->smtp->getError();
if (!empty($error['error'])) {
$message .= ' ' . $error['error'];
if (!empty($error['detail'])) {
$message .= ' ' . $error['detail'];
}
}
return $message;
}