SMTP debugging

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tmvision
Posts: 32
Joined: Fri Dec 01, 2017 8:15 am

SMTP debugging

Post by tmvision »

Hello

We have an issue with sudden smtp failures.
I am trying to enable some debug in the phpmailer/class.smtp.php however I dont seem to be able to get the debug level to increase.

When testing then the error message remains

SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: admin/testemail.php

I have tried adding public $SMTPDebug = 4; into the file without any changes. I have tried adjusting the $do_debug = self::xxx to various values and even attempted to change the constants.

Any ideas on how we can get some more information of why the connection is failing?
The account credentials were verified to work.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: SMTP debugging

Post by mbellerue »

The very first thing to check would be to make sure that logging for PHPMailer is enabled. Head to Admin -> Email Settings, and there is a checkbox there labeled Logging. Make sure it's checked.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
tmvision
Posts: 32
Joined: Fri Dec 01, 2017 8:15 am

Re: SMTP debugging

Post by tmvision »

It is checked and both the test page and the /usr/local/nagiosxi/tmp/phpmailer.log
give the same message.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: SMTP debugging

Post by mbellerue »

That is strange. Could you PM me your system profile? Admin -> System Config -> System Profile -> Download Profile
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
tmvision
Posts: 32
Joined: Fri Dec 01, 2017 8:15 am

Re: SMTP debugging

Post by tmvision »

Hello

We found that the issue was a line missing in the phpmailer/class.smtp.php due to an typing error in the file.

We also resolved the debugging issue by editing the class.phpmailer.php instead of the class.smtp.php.

Thank you for the assistance and this issue can be closed.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: SMTP debugging

Post by mbellerue »

Excellent, thank you for posting the solution here! Closing thread.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked