[CSS] +fix page header and title color
[lhc/web/www.git] / www / plugins / facteur / classes / facteur.php
index 5a8decd..46b5dee 100755 (executable)
@@ -57,7 +57,7 @@ class Facteur extends PHPMailer {
                        'adresse_envoi', 'adresse_envoi_email', 'adresse_envoi_nom', 'forcer_from',\r
                        'cc', 'bcc',\r
                        'smtp', 'smtp_host', 'smtp_port', 'smtp_auth',\r
-                       'smtp_username', 'smtp_password', 'smtp_secure', 'smtp_sender',\r
+                       'smtp_username', 'smtp_password', 'smtp_secure', 'smtp_sender', 'smtp_tls_allow_self_signed',\r
                        'filtre_images', 'filtre_iso_8859',\r
                ) as $config) {\r
                        $defaut[$config] = isset($GLOBALS['meta']["facteur_$config"]) ? $GLOBALS['meta']["facteur_$config"] : '';\r
@@ -166,6 +166,12 @@ class Facteur extends PHPMailer {
                                $this->SMTPSecure = 'tls';\r
                        }\r
 \r
+                       if ( $options['smtp_secure'] == 'tls' && $options['smtp_tls_allow_self_signed'] == 'oui' ) {\r
+                               $this->SMTPOptions = array(\r
+                                       'ssl' => array('allow_self_signed' => true)\r
+                               );\r
+                       }\r
+\r
                        // Pour le moment on remet l'ancien fonctionnement :\r
                        // on ne doit pas tester les certificats si pas demandé explicitement avec l'option TLS !\r
                        $this->SMTPAutoTLS = false;\r
@@ -404,7 +410,7 @@ class Facteur extends PHPMailer {
                        return false;\r
                }\r
                if ($this->ErrorInfo){\r
-                       spip_log($function."() : ".$this->ErrorInfo,'facteur.'._LOG_ERREUR);\r
+                       spip_log((is_array($function)?implode('::',$function):$function)."() : ".$this->ErrorInfo,'facteur.'._LOG_ERREUR);\r
                }\r
 \r
                return $retour;\r