The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
Problems with email setup in PHP 5.6 - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28)
+--- Forum: Modifications and Hackery (https://userspice.com/forums/forumdisplay.php?fid=29)
+--- Thread: Problems with email setup in PHP 5.6 (/showthread.php?tid=442)



Problems with email setup in PHP 5.6 - dimitrisscript - 01-26-2017

So I have set up userspice in a shared hosted server that runs with PHP 5.6.

I wasn't able to set up correctly email sending until I read this:

https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#php-56-certificate-verification-failure

So if you get an error "Could not connect to SMTP host" just go to \users\helpers\helpers.php around line 120 and add this code:

<pre>
Code:
$mail->SMTPOptions = array(
    'ssl' => array(
        'verify_peer' => false,
        'verify_peer_name' => false,
        'allow_self_signed' => true
    )
);
</pre>


It worked for me because I didn't have a valid certificate, because php 5.6 needs it, I just had a self-signed one.

Mind you, this is bad practice and possibly a security hole.