Grommit Posted August 6, 2020 Posted August 6, 2020 Hi I am getting this error .. any ideas ? 2020-08-06 15:16:07 Connection: opening to 52.98.18.18:587, timeout=300, options=array() 2020-08-06 15:16:07 Connection: opened 2020-08-06 15:16:07 SERVER -> CLIENT: 220 JN2P275CA0020.outlook.office365.com Microsoft ESMTP MAIL Service ready at Thu, 6 Aug 2020 15:18:57 +0000 2020-08-06 15:16:07 CLIENT -> SERVER: EHLO 192.168.2.40 2020-08-06 15:16:07 SERVER -> CLIENT: 250-JN2P275CA0020.outlook.office365.com Hello [41.21.194.54] 250-SIZE 157286400 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-8BITMIME 250-BINARYMIME 250-CHUNKING 250 SMTPUTF8 2020-08-06 15:16:07 CLIENT -> SERVER: STARTTLS 2020-08-06 15:16:07 SERVER -> CLIENT: 220 2.0.0 SMTP server ready 2020-08-06 15:16:07 Connection failed. Error #2: stream_socket_enable_crypto(): Peer certificate CN=`outlook.com' did not match expected CN=`52.98.18.18' [/var/www/html/moodle/lib/phpmailer/src/SMTP.php line 403] 2020-08-06 15:16:07 SMTP Error: Could not connect to SMTP host. 2020-08-06 15:16:07 CLIENT -> SERVER: QUIT 2020-08-06 15:16:07 SERVER -> CLIENT: 2020-08-06 15:16:07 SMTP ERROR: QUIT command failed: 2020-08-06 15:16:07 Connection: closed
barnabythebear Posted August 6, 2020 Posted August 6, 2020 Hiya, Have you installed the mail test plugin? https://moodle.org/plugins/local_mailtest Looks like a certificate issue maybe? Have you tried changing the smtp security settings to none to see if that allows mail? Thanks, Nigel.
SimonHooker Posted August 10, 2020 Posted August 10, 2020 As barnabythebear mentioned it looks like a certificate issue in that the CN of the mailserver doesn't match the CN it's provided. The IP specified appears to be a Microsoft IP, so it's odd that it is returning an ip certificate instead of a properly named one. Might there be something intercepting the traffic + issuing its own certificate i.e. a firewall?
Grommit Posted August 20, 2020 Author Posted August 20, 2020 Hi It was working fine with Outlook.office365 SMTP until we changed it to "TLS" and authentication required SMTP Host 52.98.18.18:587 or Outlook.office365.com Still, doesn't work.. 8-/
Katy Posted September 1, 2020 Posted September 1, 2020 Thank you all... it was the DNS Another one for the rule, "it's always DNS, even when it doesn't look like DNS... it's DNS"
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now