For the past 2 days I\'ve been trying to get a PHP script to send an e-mail and it doesn\'t seem to work. First I\'ve tried the normal php mail function, then PHPMailer and then
The same problem I had using Gmail and I solved it by downloading the cacert.pem certificate from the site https://curl.haxx.se/docs/caextract.html You should also write the php.ini file as follows:
extension = php_openssl.dll openssl.cafile = C: \ xampp \ php \ extras \ ssl \ cacert.pem
It must be activated in the GMail account in the label: Access and security of the option: Allow less secure apps access option: ON
This solution is thanks to matteobin user contribution, of stackoverflow