Sending email -PHP 7.0.21 and Moodle 3.4

Sending email -PHP 7.0.21 and Moodle 3.4

by Ujwala Kolte -
Number of replies: 4

Greetings!

I am using Win 7 OS, IIS 6 and FastCGI.

I can send email from my other website(local) when I set verify_peer=False. I have copied phpmailer folder in its directory. On same server I have setup moodle. Other things are working fine but I can't send email. I entered proper values in outgoing mail settings section.I assume that this problem will be resolved if I set verify_peer=False. Is it right? if so, how can I set it. Other wise please help me.

Average of ratings: -
In reply to Ujwala Kolte

Re: Sending email -PHP 7.0.21 and Moodle 3.4

by Arnaud Trouvé -
Picture of Core developers Picture of Plugin developers Picture of Plugins guardians
There is a closed issue about this in the tracker : https://tracker.moodle.org/browse/MDL-55721
The "solution" is to set the SMTPOptions with verify_peer => false into email_to_user in lib/moodlelib.php before $mail->send().
As suggested in the issue a proper solution would be to set a "valid" certificate (using https://letsencrypt.org/ for example).
In reply to Arnaud Trouvé

Re: Sending email -PHP 7.0.21 and Moodle 3.4

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
In reply to Matteo Scaramuccia

Re: Sending email -PHP 7.0.21 and Moodle 3.4

by Ujwala Kolte -

Thank you very much you both for the help. It worked. I will go for CA certificate when I will use Moodle for our Institute.  Currently I am testing. Also I will have to consider 2 step verification.