Hello.
I've got a new install of Moodle 3.4.2 (Build: 20180319)
It's running on a windows Server with IIS.
I cannot get the SMTP settings to work.
I've got MailTest running and when I try it with my work's MS Exchange mail server I get:
2018-04-12 08:01:06 Connection: opening to ssl://mail.pdmgroup.co.uk:995, timeout=300, options=array() 2018-04-12 08:01:07 Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://mail.pdmgroup.co.uk:995 (No connection could be made because the target machine actively refused it. ) [C:\inetpub\wwwroot\intranet\lib\phpmailer\src\SMTP.php line 324] 2018-04-12 08:01:07 SMTP ERROR: Failed to connect to server: No connection could be made because the target machine actively refused it. (10061) 2018-04-12 08:01:07 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
When I try it with Gmail I get:
2018-04-12 08:08:27 Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array() 2018-04-12 08:08:27 Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed [C:\inetpub\wwwroot\intranet\lib\phpmailer\src\SMTP.php line 324] 2018-04-12 08:08:27 Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [C:\inetpub\wwwroot\intranet\lib\phpmailer\src\SMTP.php line 324] 2018-04-12 08:08:27 Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) [C:\inetpub\wwwroot\intranet\lib\phpmailer\src\SMTP.php line 324] 2018-04-12 08:08:27 SMTP ERROR: Failed to connect to server: (0) 2018-04-12 08:08:27 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
If I try connecting to Gmail via TLS I get:
2018-04-12 08:20:33 Connection: opening to smtp.gmail.com:587, timeout=300, options=array() 2018-04-12 08:20:33 Connection: opened 2018-04-12 08:20:33 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP s15sm2978413wrg.28 - gsmtp 2018-04-12 08:20:33 CLIENT -> SERVER: EHLO pdm-web-01 2018-04-12 08:20:33 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [176.124.69.217] 250-SIZE 35882577 250-8BITMIME 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-CHUNKING 250 SMTPUTF8 2018-04-12 08:20:33 CLIENT -> SERVER: STARTTLS 2018-04-12 08:20:33 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS 2018-04-12 08:20:33 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:\inetpub\wwwroot\intranet\lib\phpmailer\src\SMTP.php line 403] 2018-04-12 08:20:33 SMTP Error: Could not connect to SMTP host. 2018-04-12 08:20:33 CLIENT -> SERVER: QUIT 2018-04-12 08:20:33 SERVER -> CLIENT: ,( -z-��k{�E�y��cZ�2Ic�d|@����1g�p��+�n2��1���5֣m�A�����"�0#�,?�,*�e�@Ώ���� ���3�}%F�~ȩ���^�T2��G�2�䷗���3E�.�V�n);�D1�Kde��u� ����U �O��4 ��{{wd��,,�����x��K�ކ���!�B~�����X��ܞ��p�:��Yl^�JK�v��HȒ ��]Q��A\w<��`TD���9K� �]�EH��(ź� 2018-04-12 08:20:33 SMTP ERROR: QUIT command failed: ,( -z-��k{�E�y��cZ�2Ic�d|@����1g�p��+�n2��1���5֣m�A�����"�0#�,?�,*�e�@Ώ���� ���3�}%F�~ȩ���^�T2��G�2�䷗���3E�.�V�n);�D1�Kde��u� ����U �O��4 ��{{wd��,,�����x��K�ކ���!�B~�����X��ܞ��p�:��Yl^�JK�v��HȒ ��]Q��A\w<��`TD���9K� �]�EH��(ź� 2018-04-12 08:20:33 Connection: closed 2018-04-12 08:20:33 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
I have Open SSL enabled in my PHP settings.
I don't mind which email I get to work, I just need to get one to work - what am I doing wrong?
Thanks in advance for your support!