<?php
//Préparation des adresses
$mails = array();
foreach($_POST['mail'] as $mail){
	if (preg_match("/@/i", $mail)) {
		array_push($mails, $mail);
	}
}
if (preg_match("/@/i", $_POST['mail1'])) { array_push($mails, $_POST['mail1']); }
if (preg_match("/@/i", $_POST['mail2'])) { array_push($mails, $_POST['mail2']); }
//Préparation de l'objet
$objet = $hor_res;
//Préparation du texte
$body = $mail_reservs;
$email_exp = mysqli_fetch_assoc(mysqli_query($bdd,"SELECT login, mail FROM ".$prefix."_user WHERE id = '".$_SESSION['user_id']."'"));
$exp_mail = $email_exp['mail'];
$exp_login = $email_exp['login'];
//Envoi à partir des éléments précédents :
include('mailing_config.php');
?>