gmail仍然用php mail()显示html标签; [关闭]
问题描述:
I looked up on this website and on the php.net website which tags I should send with my php mail() function to correctly send html mail. Somehow my gmail still shows the html tags. What am I doing wrong on this?
$to = "$email";
$subject = "order placed";
$from = "noreply@snorgytees.tk";
$message = "
Hi, '{$_SESSION['naam']}';
<html>
<head>
</head>
<body>
<table>
<tr>
<td>$Artikelnaam></td>
<td>$maat</td>
<td>$hoeveelheid</td>
<td>$$echteprijs</td>
<td>Total: $$totaalprijs;
<br><br>Total including VAT: $$prijs_btw</td>
</tr>
</table>
</body>
</html>
";
$headers = 'MIME-Version: 1.0' . "
";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "
";
$headers .= 'To: $_POST["email"]' . "
";
$headers .= 'From: noreply@snorgytees.tk' . "
";
mail($to, $subject, $from, $message, $headers);
答
I had the same issue about a week ago, this one helped me solve it out. gmail does not render html in email