Hello,
I am receiving the following error when configuring SMTP with TLS in our Moodle Server:
Using our exchange server as a relay.
Moodle Version: 3.5.2+ (Build: 20180927)
Using a XAMPP build.
---
2019-01-30 15:07:06 Connection: opening to XXXXXXXXXXXXX:587, timeout=300, options=array()
2019-01-30 15:07:06 Connection: opened
2019-01-30 15:07:06 SERVER -> CLIENT: 220 XXXXXXXXXXXX Microsoft ESMTP MAIL Service ready at Wed, 30 Jan 2019 16:07:06 +0100
2019-01-30 15:07:06 CLIENT -> SERVER: EHLO xxxxxxxxxxxxxxxx
2019-01-30 15:07:06 SERVER -> CLIENT: 250-XXXXXXXXX Hello [XXXXXXXXXXX]
250-SIZE 52428800
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-AUTH GSSAPI NTLM
250-8BITMIME
250-BINARYMIME
250 CHUNKING
2019-01-30 15:07:06 CLIENT -> SERVER: STARTTLS
2019-01-30 15:07:06 SERVER -> CLIENT: 220 2.0.0 SMTP server ready
2019-01-30 15:07:06 Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed [C:\xampp\htdocs\moodle\lib\phpmailer\src\SMTP.php line 403]
2019-01-30 15:07:06 SMTP Error: Could not connect to SMTP host.
2019-01-30 15:07:06 CLIENT -> SERVER: QUIT
2019-01-30 15:07:06 SERVER -> CLIENT:
2019-01-30 15:07:06 SMTP ERROR: QUIT command failed:
2019-01-30 15:07:06 Connection: closed
2019-01-30 15:07:06 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
---
I've found several forum posts and articles online with the same error, but the problem is that I'm a complete PHP beginner. My question is; where can I define where the SSL cert is located? Is it in the php.ini or in the PHPMailer.php? Or should Moodle automatically read it out of the Windows Cert Store on the server?
Any assistance on the matter is very much appreciated.
Thank you in advance!