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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
jacek
Posts: 244
Joined: Wed Sep 09, 2015 5:49 am

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

Post 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?
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

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

Post 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
jacek
Posts: 244
Joined: Wed Sep 09, 2015 5:49 am

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

Post by jacek »

This worked perfectly, thank you!
Kedwards
Posts: 1
Joined: Fri Jun 09, 2023 3:34 pm

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

Post by Kedwards »

Same scenario with updating Nagios XI to 5.10.0.
Following this process corrected our issue.
Thank you!
Brueckner
Posts: 1
Joined: Fri Jan 04, 2019 4:41 am

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

Post by Brueckner »

This didn't work for me at all, still the same issue
Post Reply