Page 1 of 1

SMTP debugging

Posted: Wed Sep 04, 2019 8:11 am
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.

Re: SMTP debugging

Posted: Wed Sep 04, 2019 12:25 pm
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.

Re: SMTP debugging

Posted: Thu Sep 05, 2019 2:19 am
by tmvision
It is checked and both the test page and the /usr/local/nagiosxi/tmp/phpmailer.log
give the same message.

Re: SMTP debugging

Posted: Thu Sep 05, 2019 2:50 pm
by mbellerue
That is strange. Could you PM me your system profile? Admin -> System Config -> System Profile -> Download Profile

Re: SMTP debugging

Posted: Fri Sep 06, 2019 4:45 am
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.

Re: SMTP debugging

Posted: Fri Sep 06, 2019 9:48 am
by mbellerue
Excellent, thank you for posting the solution here! Closing thread.