I've been using Moodle 3.10.1 and configuring outgoing mail server with there parameters: SMTP hosts: smtp.gmail.com:465
SMTP security: SSL
SMTP username: my email address @gmail.com
SMTP password: my password for the above email account
but after test out email configuration, Moodle return these errors:
**2021-03-01 08:49:30 Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array()
2021-03-01 08:49:30 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 [D:\wamp64\www\myweb\lib\phpmailer\src\SMTP.php line 344]
2021-03-01 08:49:30 Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [D:\wamp64\www\myweb\lib\phpmailer\src\SMTP.php line 344]
2021-03-01 08:49:30 Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) [D:\wamp64\www\myweb\lib\phpmailer\src\SMTP.php line 344]
2021-03-01 08:49:30 SMTP ERROR: Failed to connect to server: (0) 2021-03-01 08:49:30 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting**
Please help me to fix error. Thank in advance.