envoi de mail html avec php
Bonjour
sur un serveur j'ai un ptit script qui envoi des mails au format html qui fonctionne tres bien..
je l'ai mis sur un serveur 1&1 et la .. il ne fonctionne plus..
Code:
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
|
$destinataire = "$email";
$objet = 'envoi de mail' ;
$message = "
<html>
<head>
<title>Bonjour</title>
</head>
<body>
Bonjour,<br/>
<br/>
Si vous l'accepter, merci de cliquer sur le lien situez en dessous.
<br />
<hr style='color: orange;
background-color: orange;
height: 1px;
border: 0;'/>
<br />
<div style='padding:8px;background-color:#FEFF7F; width:700px; border:1px solid black;'>
<div style='width:350px; float:left; text-align:left; font-size:18px; color:#9E9F00'>$objetdevis </div>
<div style='width:150px; float:right; text-align:right; font-size:18px; color:#9E9F00'>$date </div>
<br /><br />
</div>
</div>
</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: Néoportage <no-reply@neoportage.com>\n";
$headers .= "Cc: \n";
$headers .= "Bcc: \n";
// On envoi lemail
if ( mail($destinataire, $objet, $message, $headers) ) echo "goo";
else echo "raté";
?> |
si quelqu'un avait une petite idée..