1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| <?php
if (get_magic_quotes_gpc())
{
$civilite = stripslashes($_POST['civilite']);
$nom = stripslashes($_POST['nom']);
$expediteur = stripslashes($_POST['email']);
$sujet = stripslashes($_POST['sujet']);
$message = stripslashes($_POST['message']);
}
else
{
$civilite = $_POST['civilite'];
$nom = $_POST['nom'];
$expediteur = $_POST['email'];
$sujet = $_POST['sujet'];
$message = $_POST['message'];
}
$corpmail="Rappel des infos saisies : \n
CIVILITE : $civilite \n
NOM: $nom \n
EXPEDITEUR : $expediteur \n
SUJET : $sujet \n
MESSAGE : $message \n;
$to = 'alerte@********.com';
$msg = 'Bonjour,'."\r\n\r\n";
$msg .= 'Ce mail a été envoyé depuis monsite.com par '.$civilite.' '.$nom."\r\n\r\n";
$msg .= 'Voici le message qui vous est adressé :'."\r\n";
$msg .= '***************************'."\r\n";
$msg .= $corpmail."\r\n";
$msg .= '***************************'."\r\n";
$headers = 'From: '.$nom.' <'.$expediteur.'>'."\r\n\r\n";
mail($to, $sujet, $msg, $headers);
?> |
Partager