Page 1 of 1

Mails don't get send - SMTP connect() failed.

Posted: Tue May 23, 2023 7:29 am
by jacek
Hi,

after upgrading to 5.10.0 sending mails stopped working.
I tried troubleshooting but without success.

Our setup is very simple, smtp relay, no encryption, no authentication, things worked until the upgrade.
The test email debug says that:

Code: Select all

Mailer said: [05-23-2023 12:27:40] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/TroubleshootingSMTP server error: QUIT command failed (method=smtp;host=smtp.serveraddress.com;port=25;security=none), Referer: admin/testemail.php
An error occurred sending a test email!
I can reach the server, dns is ok, telneting to port 25 on that smtp server also works, any ideas?

Re: Mails don't get send - SMTP connect() failed.

Posted: Tue May 23, 2023 4:28 pm
by pbroste
Hello @jacek

Thanks for reaching out, let's make the following update:

Make a backup:

Code: Select all

cp  /usr/local/nagiosxi/html/includes/components/oauth2/vendor/phpmailer/phpmailer/src/PHPMailer.php /usr/local/nagiosxi/html/includes/components/oauth2/vendor/phpmailer/phpmailer/src/PHPMailer.php.bkp.5.10.0
Update by:

Code: Select all

sed -i  s/'public $SMTPAutoTLS = true'/'public $SMTPAutoTLS = false'/1  /usr/local/nagiosxi/html/includes/components/oauth2/vendor/phpmailer/phpmailer/src/PHPMailer.php
Restart the Apache service and send test email

Thanks,
Perry

Re: Mails don't get send - SMTP connect() failed.

Posted: Wed May 24, 2023 1:55 am
by jacek
This worked perfectly, thank you!

Re: Mails don't get send - SMTP connect() failed.

Posted: Fri Jun 09, 2023 3:39 pm
by Kedwards
Same scenario with updating Nagios XI to 5.10.0.
Following this process corrected our issue.
Thank you!

Re: Mails don't get send - SMTP connect() failed.

Posted: Tue Jun 20, 2023 8:13 am
by Brueckner
This didn't work for me at all, still the same issue