Mailer = 'smtp'; $this->Host = $options['smtp_host']; $this->Port = $options['smtp_port']; // SMTP authentifié ? $this->SMTPAuth = false; if (isset($options['smtp_auth']) and ($options['smtp_auth']==='oui' or $options['smtp_auth']===true) and !empty($options['smtp_username']) and !empty($options['smtp_password'])){ $this->SMTPAuth = true; $this->Username = $options['smtp_username']; $this->Password = $options['smtp_password']; } if (!empty($options['smtp_secure']) and in_array($options['smtp_secure'], ['ssl', 'tls'])){ $this->SMTPSecure = $options['smtp_secure']; } if ($options['smtp_tls_allow_self_signed']=='oui'){ $this->SMTPOptions = array( 'ssl' => array('allow_self_signed' => true) ); } // Pour le moment on remet l'ancien fonctionnement : // on ne doit pas tester les certificats si pas demandé explicitement avec l'option TLS ! $this->SMTPAutoTLS = false; } } }