From 57347817b4019f023a6a0f602f197cfe9a908c28 Mon Sep 17 00:00:00 2001 From: Thomas Ingles Date: Sun, 23 Mar 2025 16:52:48 +0100 Subject: [PATCH] Fix the smtp error `ErrorInfo` msg: Troubleshooting url glued `SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/TroubleshootingSMTP server error: Failed to connect to server SMTP code: 111 Additional SMTP info: Connection refused` Become `SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting SMTP server error: Failed to connect to server SMTP code: 111 Additional SMTP info: Connection refused` --- src/PHPMailer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PHPMailer.php b/src/PHPMailer.php index 4a6077c0..a8f157d0 100644 --- a/src/PHPMailer.php +++ b/src/PHPMailer.php @@ -4180,7 +4180,7 @@ class PHPMailer if ('smtp' === $this->Mailer && null !== $this->smtp) { $lasterror = $this->smtp->getError(); if (!empty($lasterror['error'])) { - $msg .= $this->lang('smtp_error') . $lasterror['error']; + $msg .= ' ' . $this->lang('smtp_error') . $lasterror['error']; if (!empty($lasterror['detail'])) { $msg .= ' ' . $this->lang('smtp_detail') . $lasterror['detail']; }