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 39 40 41 42 43 44 45 46 47 48 49 50
|
<?
// On initialise les variables
$destinataire = "xxxxxxx@bbox.fr";
$objet = "Voici une liste de sites à visiter." ;
$message = 'coucou' ;
</?>
<html>
<head>
<title>Liste de site à visiter</title>
</head>
<body>
<table>
<tr>
<th width="59"><font color="#FF0000">Nom</font></th>
<th width="94"><font color="#FF0000">Adresse</font></th>
</tr>
<tr>
<td>Site de la commune de Felzins</td>
<td> http://www.felzins.fr </td>
</tr>
<tr>
<td>Site de la société BC Relocation</td>
<td>http://www.bcrelocation.fr</td>
</tr>
<br>
<h3>Donne moi ton avis. </h3>
</table>
</body>
</html>
';
/* Si lon veut envoyer un mail au format HTML, il faut configurer le type Content-type. */
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
/* Quelques types dentêtes : errors, From cc's, bcc's, etc */
$headers .= "From: Des trucs à Web <totor@exemple.com>\n";
$headers .= "Cc: test@exemple.com\n";
$headers .= "Bcc: autre.destinataire@exemple.com\n";
// On envoi lemail
if ( mail($destinataire, $objet, $message, $headers) ) echo "Envoi du mail réussi.";
else echo "Echec de lenvoi du mail.";
?> |
Partager