CopyPastor

Detecting plagiarism made easy.

Score: 1; Reported for: Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2019-04-06
by Bastiaan Buitelaar

Original Post

Original - Posted on 2016-04-04
by Marten Koetsier



            
Present in both answers; Present only in the new answer; Present only in the old answer;

You should put
$mail->SMTPOptions = array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) );
In between your phpmailer settings, ideally after secure: ssl
Since this questions shows up high in google, I'd like to share here my solution for the case where PHP was just upgraded to version 5.6 (which has stricter SSL behavior).
The PHPMailer wiki has a section on this:
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#php-56-certificate-verification-failure
The suggested workaround is including the following piece of code:
$mail->SMTPOptions = array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) );
This should work for PHPMailer 5.2.10 (and up).
**Note:** Obviously, and also as suggested in that wiki, this should be a temporary solution!
>**The correct fix for this is to replace the invalid, misconfigured or self-signed certificate with a good one.**

        
Present in both answers; Present only in the new answer; Present only in the old answer;