Im using a aws ec2 RHEL 7 instance with Apache,PHP and Mariadb for moodle 3.5, i have tried to use gmail for outgoing mails from moodle
Im having following error when using TLS with it
2018-11-01 06:45:45 Connection: opening to smtp.gmail.com:587, timeout=300, options=array() 2018-11-01 06:45:45 Connection: opened 2018-11-01 06:45:45 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP z11-v6sm6465404pfi.4 - gsmtp 2018-11-01 06:45:45 CLIENT -> SERVER: EHLO example.com 2018-11-01 06:45:46 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [10.10.23.14] 250-SIZE 35882577 250-8BITMIME 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-CHUNKING 250 SMTPUTF8 2018-11-01 06:45:46 CLIENT -> SERVER: STARTTLS 2018-11-01 06:45:46 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS 2018-11-01 06:45:46 Connection failed. Error #2: failed loading cafile stream: `/root/sslcrt/cacert.pem' [/var/www/html/html_moodle/lib/phpmailer/src/SMTP.php line 403] 2018-11-01 06:45:46 SMTP Error: Could not connect to SMTP host. 2018-11-01 06:45:46 CLIENT -> SERVER: QUIT 2018-11-01 06:45:46 SERVER -> CLIENT: F 2018-11-01 06:45:46 SMTP ERROR: QUIT command failed: F 2018-11-01 06:45:46 Connection: closed 2018-11-01 06:45:46 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting