Random SMTP send failures with Office 365
Posted: Thu Apr 06, 2017 11:30 am
Hello,
I've noticed that I haven't received several email notifications from Nagios XI since we switched from a local SMTP proxy to directly sending to Office 365. The notifications are recorded in Nagios XI as being sent but they are never received. I know of cases in which some co-workers received an alert that I did not, even though Nagios XI has recorded that it sent one to me. I have debugging enabled for PHPMailer and here's an example from last night that shows a few failures in between successes. Is there some way to have PHPMailer retry on failure and keep retrying until it sends those failed messages?
I've noticed that I haven't received several email notifications from Nagios XI since we switched from a local SMTP proxy to directly sending to Office 365. The notifications are recorded in Nagios XI as being sent but they are never received. I know of cases in which some co-workers received an alert that I did not, even though Nagios XI has recorded that it sent one to me. I have debugging enabled for PHPMailer and here's an example from last night that shows a few failures in between successes. Is there some way to have PHPMailer retry on failure and keep retrying until it sends those failed messages?
Code: Select all
[04-05-2017 22:12:16] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:12:25] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:12:28] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:12:33] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:12:39] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:12:42] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:12:48] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Mobile Text
[04-05-2017 22:12:54] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:17:08] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:17:13] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:17:15] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:17:23] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:17:30] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:17:34] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:17:43] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Mobile Text
[04-05-2017 22:17:52] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:17:57] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:18:00] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:18:02] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:18:07] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:18:11] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Mobile Text
[04-05-2017 22:18:20] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 22:18:26] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 23:21:44] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 23:21:49] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 23:21:58] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 23:22:01] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 23:22:05] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Mobile Text
[04-05-2017 23:22:09] Message sent! (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[04-05-2017 23:22:13] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email