PHP: HTML wysyła e-mail w formacie html
Śledzę samouczekhttp://css-tricks.com/sending-nice-html-email-with-php/ wysyłać pocztę w formacie html.
Mój ciąg wygląda jak
$message = '<html><body>';
$message .= '<img src="http://css-tricks.com/examples/WebsiteChangeRequestForm/images/wcrf-header.png" alt="Website Change Request" />';
$message .= '<table rules="all" style="border-color: #666;" cellpadding="10">';
$message .= "<tr style='background: #eee;'><td><strong>Dear:</strong> </td><td>" . strip_tags($part_name). "</td></tr>";
$message .= "<tr><td><strong>.$user_name.has fixed an appointment with you on :</strong> </td><td>" . strip_tags($time). "</td></tr>";
$message .= "<tr><td><strong>In:</strong> </td><td>" . strip_tags($meeting_name) . "</td></tr>";
$message .= "<tr><td><strong>Please click on:</strong> </td><td><a href=" . strip_tags($approve_url). "</a> To approve</td></tr>";
$message .= "</table>";
$message .= "</body></html>";
// CHANGE THE BELOW VARIABLES TO YOUR NEEDS
$subject = 'Appointment Request ';
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
Ale otrzymana poczta nie jest sformatowana w HTML, ale wygląda jak
<html>
<body>
<img src="http://css-tricks.com/examples/WebsiteChangeRequestForm/images/wcrf-header.png" alt="Website Change Request" />
<table rules="all" style="border-color: #666;" cellpadding="10">
<tr style='background: #eee;'>
<td>
<strong>Dear:</strong>
</td>
<td>Depu</td>
</tr>
<tr>
<td>
<strong>.pandit.has fixed an appointment with you on :</strong>
</td>
<td>
</td>
</tr>
<tr>
<td>
<strong>In:</strong>
</td>
<td>anyp</td>
</tr>
<tr>
<td>
<strong>Please click on:</strong>
</td>
<td>
<a href=http://192.168.0.178/UI/user/approvemeeting.php?meetingid=REG_939300945&key=3107</a> To approve
</td>
</tr>
</table>
</body>
</html>
Proszę mi powiedzieć, co robię źle, dlaczego poczta nie jest w formacie HTML