File: /home/frenchy/refonte2023/wordpress/evenements/test.php
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'admin/PHPMailer/src/Exception.php';
require 'admin/PHPMailer/src/PHPMailer.php';
require 'admin/PHPMailer/src/SMTP.php';
setlocale (LC_TIME, 'fr_FR.utf8','fra');
$mail = new PHPmailer();
$mail->IsSMTP(); // send via SMTP
$mail->Mailer = "smtp"; // Mode d'acces
$mail->Host = "smtp.office365.com"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentification
$mail->Username = "sendmail@french-american.org"; // SMTP username
$mail->Password = "SE4848+1"; // SMTP password
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->IsHTML(true);
$mail->Sender = "contact@french-american.org";
$mail->From="contact@french-american.org";
$mail->FromName="French-american.org";
$mail->AddReplyTo("contact@french-american.org");
$mail->Subject="test smtp";
$mail->Body=utf8_decode("test smtp");
$mail->ClearAddresses();
$mail->AddAddress("francky1006@netcourrier.com");
$mail->Send();
$mail->AddAddress("damaral@infinal.fr");
$mail->Send();
?>