Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 5.6 issue with PHPmailer #7

Open
sanderha opened this issue Jan 26, 2016 · 3 comments
Open

PHP 5.6 issue with PHPmailer #7

sanderha opened this issue Jan 26, 2016 · 3 comments

Comments

@sanderha
Copy link

Hello

Running this module on a PHP5.6 project, will give an error concerning certificates. The issue and the fix for it is decribed here:
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#php-56-certificate-verification-failure

I fixed it by adding the following to your initMailer() method:

        $mail->SMTPOptions = array(
            'ssl' => array(
                'verify_peer' => false,
                'verify_peer_name' => false,
                'allow_self_signed' => true
            )
        );

It is of course better to get a real certificate, although in my case this was an alright solution.

Cheers

@markguinn
Copy link
Owner

This would need to be configurable as I doubt it's a very common use case. As long as it was configurable I'd merge a PR though.

@xini
Copy link
Contributor

xini commented Mar 24, 2016

I assume you are running the site on Windows? On Windows PHP comes without root certificates installed. You can solve this by adding the root certs to your curl.cainfo in php.ini, see http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/.

@tazzydemon
Copy link

Its because in calss.phpmailer.php there is a variable $SMTPAutoTLS = true. The emailhelper class needs and option to make it false. I had the same issue after switching to 5.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants