Je suis essayer d'envoyer un mail à partir de mon application php.Mail envoyer avec succès, mais le texte en texte clair qui contient html tags.is là une solution pour cela.S'il vous plaît m'aider.Mon message est comme suitFonction PHP Mail affiche les messages en texte brut dans la boîte de réception
$message = '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Gaishan</title>
</head>
<body>
<table width="750" border="0" cellspacing="0" cellpadding="0" style="background-color:#043c58; padding:15px;">
<tr>
<td style="padding-bottom:10px;"><a href="#"><img src="http://www.toobler.com/staging/gaishan/index.php/users/ec/1/logo_mail.jpg"; border="0" /></a></td>
</tr>
<tr>
<td colspan="2" style="background-color:#fff; padding:10px 30px;"><h1 style="font-family:Arial, Helvetica, sans-serif; font-size:26px; font-weight:bold; color:#111;">testmail</h1>
<p style="font-family:Arial, Helvetica, sans-serif; font-size:14px; font-weight:normal; color:#555; line-height:22px;">http://www.toobler.com/</p>
<a href="http://www.toobler.com/" style="font-family:Arial, Helvetica, sans-serif; color:#7ea515; text-decoration:underline;">http://www.toobler.com/staging/gaishan/index.php/users/ec/1/'.time().'</a>
<p style="font-family:Arial, Helvetica, sans-serif; font-size:14px; font-weight:normal; color:#4a483f; line-height:22px;">Demo textDemo textDemo textDemo text</p>
<p style="font-family:Arial, Helvetica, sans-serif; font-size:14px; font-weight:normal; color:#4a483f; line-height:22px;">Demo textDemo textDemo textDemo textDemo text</p>
<br />
<p style="font-family:Arial, Helvetica, sans-serif; font-size:14px; font-weight:normal; color:#4a483f; line-height:22px;">Demo textDemo textDemo text<br />
Demo textDemo textDemo text Demo textDemo text
</p>
</td>
</tr>
</table>
</body>
</html>
';
D'accord, cependant le codage (charset) devrait être utf-8 car c'est celui contenu dans le html, je le crois. –
Merci beaucoup.travers parfaitement – abhis
Moritz tacheté +1 –