par
collaud » 23 juin 2005, 09:38
ouais, par exemple :
<?
//destinataire :
$to = "[email protected]";
// sujet :
$subject = "Annonce importante";
// message :
$message = "
<html>
<head>
<title>Annonce importante</title>
</head>
<body>
<p>Voici la liste des dates importante</p>
<table>
<tr>
<th>Ami</th><th>Jour</th><th>Mois</th><th>Année</th>
</tr>
<tr>
<td>Guillaume</td><td>3</td><td>Août</td><td>1970</td>
</tr>
<tr>
<td>Sandra</td><td>17</td><td>Août</td><td>1973</td>
</tr>
</table>
</body>
</html>";
// Pour envoyer du mail au format html, vous pouvez configurer le type content-type :
$headers = "MIME-Version: 1.0\r\n";
$headers .= "content-type: text/html; charset=iso-8859-1\r\n";
// D'autres en-têtes : errors, From cc's, bcc's, etc :
$headers .= "From: Moi <[email protected]>\r\n";
//envoi du mail :
mail($to, $subject, $message, $headers);
?>
ouais, par exemple :
[php]<?
//destinataire :
$to = "
[email protected]";
// sujet :
$subject = "Annonce importante";
// message :
$message = "
<html>
<head>
<title>Annonce importante</title>
</head>
<body>
<p>Voici la liste des dates importante</p>
<table>
<tr>
<th>Ami</th><th>Jour</th><th>Mois</th><th>Année</th>
</tr>
<tr>
<td>Guillaume</td><td>3</td><td>Août</td><td>1970</td>
</tr>
<tr>
<td>Sandra</td><td>17</td><td>Août</td><td>1973</td>
</tr>
</table>
</body>
</html>";
// Pour envoyer du mail au format html, vous pouvez configurer le type content-type :
$headers = "MIME-Version: 1.0\r\n";
$headers .= "content-type: text/html; charset=iso-8859-1\r\n";
// D'autres en-têtes : errors, From cc's, bcc's, etc :
$headers .= "From: Moi <
[email protected]>\r\n";
//envoi du mail :
mail($to, $subject, $message, $headers);
?>[/php]