42 lines
1.0 KiB
PHP
42 lines
1.0 KiB
PHP
<?php
|
|
|
|
use PHPMailer\PHPMailer\PHPMailer;
|
|
use PHPMailer\PHPMailer\Exception;
|
|
|
|
// Inclusion des fichiers
|
|
require 'PHPMailer/Exception.php';
|
|
require 'PHPMailer/PHPMailer.php';
|
|
require 'PHPMailer/SMTP.php';
|
|
|
|
$mail = new PHPMailer(true);
|
|
$mail->CharSet = 'UTF-8'; // Utiliser UTF-8
|
|
$mail->Encoding = 'base64'; // Encodage du contenu
|
|
$mail->isSMTP();
|
|
|
|
//Enable SMTP debugging
|
|
// 0 = off (for production use)
|
|
// 1 = client messages
|
|
// 2 = // dev => client and server messages
|
|
// $mail->SMTPDebug = 2; // dev => client and server messages
|
|
$mail->SMTPDebug = 0;
|
|
|
|
// $mail->Debugoutput = 'html';
|
|
|
|
$mail->Host = 'smtp.gmail.com';
|
|
// $mail->Host = gethostbyname('smtp.gmail.com');
|
|
// if your network does not support SMTP over IPv6
|
|
|
|
$mail->Port = 587;
|
|
|
|
$mail->SMTPSecure = 'tls';
|
|
|
|
$mail->SMTPAuth = true;
|
|
|
|
$mail->Username = "intersantesaas@gmail.com";
|
|
// $mail->Password = "Moritio1973";
|
|
$mail->Password = "qvix febq ylkp enks";
|
|
|
|
$mail->setFrom('intersantesaas@gmail.com', 'INTER-SANTE : EBENE');
|
|
|
|
$_SESSION['c_mail'] = $mail;
|