<?
$headers = "From: $none <$name>\n";
$headers .= "X-Sender: $name\n";
$headers .= "X-Mailer: had0mail\n";
$headers .= "Return-Path: <$reply>\n";
if($type="html"){
$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; }
else{
$headers .= "Content-Type: text/plain\n";
}
$headers .= "X-Priority: $priority\n";
$headers .= "Cc: $Cc\r\n";
$headers .= "Bcc: $Bcc\r\n";
$headers .= "Date: $day1, $day2 $month $year $time $zone \n"; //ex : "Date: Tue, 22 Jul 2003 13:39:04 +0200"
$chaos = "$richard";
$chit = "0";
//Envoie du mail
for ($fin = 0; $fin <= $chaos; $fin++) {
$chit++;
if (@mail($to,$object,$msg,$headers))
{
$index="http://domaine.free.fr"; //page de retour si tout se passe bien
$retour="hadomail.htm"; //Page de retour en cas d'échec de l'envoi
//Envoie du mail réussi
echo <<< HTML
<html>
<head>
<title>had0mail</title>
</head>
<body><br><font color="#33333"><b>Mail # $chit ok.</b></font>
</body>
</html>
HTML;
}
else //Echec lors de l'envoi
{
echo <<< HTML
<html>
<head>
<title>had0mail</title>
</head>
<body>
<font color="#66666" size="4"><b>Had0mail</b></font>
<br><br>
<font color="#33333"><b>Echec Lors de l\'envoi du mail.</b></font>
<br><a href="$retour">Retour</a>
</body>
</html>
HTML;
}
}
?>
<html>
<head>
<title>Had0mail Revolution</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form1" method="POST" action="mail.php">
<table width="74%" border="0">
<tr>
<td width="28%"><strong>Sujet : </strong></td>
<td width="72%">
<input name="object" type="text" id="object8">
</td>
</tr>
<tr>
<td><strong>Expediteur :</strong></td>
<td><input name="name" type="text" id="from6">
</td>
</tr>
<tr>
<td><strong>Nom de l'expediteur :</strong></td>
<td><input name="none" type="text" id="from6">
</td>
</tr>
<tr>
<td><strong>Adresse de retour :</strong></td>
<td><font size="2">
<input name="reply" type="text" id="reply4">
</font></td>
</tr>
<tr>
<td><strong>Contenu du message : </strong></td>
<td><select name="type" id="select3">
<option value="txt">Texte</option>
<option value="html">Html</option>
</select>
</td>
</tr>
<tr>
<td><strong>Destinataire : </strong></td>
<td><input name="to" type="text">
</td>
</tr>
<tr>
<td valign="top"><strong>Autre destinataire :</strong></td>
<td><input name="Cc" type="text" id="to"></td>
</tr>
<tr>
<td><strong>Autre destinataire (caché) :</strong></td>
<td><textarea name="Bcc" id="to2" rows="20" cols="20"></textarea></td>
</tr>
<tr>
<td valign="top"><strong>Priorité : </strong></td>
<td><select name="priority" id="priority">
<option value="1">Haute
<option value="2">Moyenne
<option value="3" selected>Normale
</select></td>
</tr>
<tr>
<td><strong>Date et heure:</strong></td>
<td><select name="day1" id="day1">
<option value="Mon">Lundi</option>
<option value="Tue">Mardi</option>
<option value="Wed">Mercredi</option>
<option value="Thu">Jeudi</option>
<option value="Fri">Vendredi</option>
<option value="Sat">Samedi</option>
<option value="Sun">Dimanche</option>
</select>
<select name="day2" id="day2">
<option value="1">1
<option value="2">2
<option value="3">3
<option value="4">4
<option value="5">5
<option value="6">6
<option value="7">7
<option value="8">8
<option value="9">9
<option value="10">10
<option value="11">11
<option value="12">12
<option value="13">13
<option value="14">14
<option value="15">15
<option value="16">16
<option value="17">17
<option value="18">18
<option value="19">19
<option value="20">20
<option value="21">21
<option value="22">22
<option value="23">23
<option value="24">24
<option value="25">25
<option value="26">26
<option value="27">27
<option value="28">28
<option value="29">29
<option value="30">30
<option value="31">31
</select>
<select name="month" id="month">
<option value="Jan">Janvier</option>
<option value="Feb">Février</option>
<option value="Mar">Mars</option>
<option value="Apr">Avril</option>
<option value="May">Mai</option>
<option value="Jun">Juin</option>
<option value="Jul">Juillet</option>
<option value="Aug">Août</option>
<option value="Sep">Septembre</option>
<option value="Oct">Octobre</option>
<option value="Nov">Novembre</option>
<option value="Dec">Décembre</option>
</select>
<input name="time" type="text" id="time" value="HH:MM:SS" size="13" maxlength="13"> <input name="year" type="text" id="year" value="yyyy" size="4" maxlength="5">
<font size="2">Fuseau
:
<input name="zone" type="text" id="zone" value="+0200" size="5" maxlength="6">
</font> </td>
</tr>
<tr>
<td valign="top"><strong>nombre de copie<input type=text name=richard size=2 maxlength=100 value='1'><br>Corps du message:</strong> </td>
<td><textarea name="msg" cols="50" rows="10" id="textarea"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Poster" method="POST" action="mail.php"></td>
</tr>
</table>
</div>
</form>
</body>
</html>