Page 1 of 1

send test mail with office 365

Posted: Wed Apr 05, 2017 8:26 am
by supercom
hello
im trying to send test mail with user name and password on my office 365 account and i get error :

A test email was sent to *****@******
----
Mailer said: [04-05-2017 14:16:40] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=ssl), Referer: admin/testemail.php
An error occurred sending a test email!

my smtp host is : smtp.office365.com

can some one help ?

thanks .

Re: send test mail with office 365

Posted: Wed Apr 05, 2017 2:28 pm
by mcapra
Office365 is notoriously strict when it comes to who it accepts direct connections from. Do you have any mail servers authorized as relays that you can configure? That's typically how people send their Nagios XI notifications from an Office365 environment; By using a relay.

Re: send test mail with office 365

Posted: Thu Apr 06, 2017 5:25 am
by supercom
thanks .
i add a relay rule in my office 365 account but still i get error .
any idea ?
where can i see more details about my error so i can debug it ?

Re: send test mail with office 365

Posted: Thu Apr 06, 2017 4:13 pm
by cdienger
Hi Supercom,

I noticed you were using SSL to connect to the mail server. Try switching this to use TLS instead under Admin > System Config > SMTP settings. I also found this: https://support.office.com/en-us/articl ... e2dba21de6 which may help you troubleshoot further on the Office side.

You said that you configured a relay rule in your office 365 account, but did you reconfigure Nagios to point at the relay? Most sysadmins configure an internal relay that Nagios points to. The relay is then responsible for getting the mail to the Office 365 servers.