Не отправляет Html документ функция mail
Добавлено: 2012-10-03 12:31:59
вот скрипт
и письмо приходит с текстом
Код: Выделить всё
$to='bobotol@domain';
$subject = '=?koi8-u?B?'.base64_encode('привет всем').'?=';
$header="Content-type: text/plain; charset=\"koi8-u\"";
$header.="From: admin <admin@domain>";
$header.="Subject: $subject";
$header.="Content-type: text/plain; charset=\"koi8-u\"";
$msg='
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';
mail( $to, $subject, $msg, $header);
- <html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>