Skip to content

gmail and certs #2679

Answered by precords
precords asked this question in Q&A
May 11, 2022 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Ok, so no SSL needs to be on your server at all. You can connect to smtp.gmail.com with phpmailer and a current cacert.pem in the etc/ssl/cacert.pem place. You can get a current cacert.pem following the instruction in the manual
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#certificate-verification-failure

or you can do this by SSH

wget https://curl.se/ca/cacert.pem -P /var/tmp/
mv /var/tmp/cacert.pem /etc/ssl/certs/cacert.pem

Modify your php.ini and change these lines:

openssl.cafile = /etc/ssl/cacert.pem
curl.cainfo = /etc/ssl/cacert.pem

Then you must restart or reload you PHP

Then all will work

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@precords
Comment options

@precords
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by precords
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants