|
|
|
| Подскажите, в чем ошибка? На локальном компе в письмо отправляется весь текст, что находиться в mail();
<?
$h = "To: my@mail.ru\r\n";
$h .= "From: Name <suppotr@mail.com>\r\n";
$h .= "Subject: New mail\r\n";
$h .= "MIME-Version: 1.0\r\n";
$h .= "Content-Type: multipart/mixed; boundary=\"razdel\"";
$file = file_get_contents('./img/logo.gif');
mail("my@mail.ru", "New mail",
"--razdel\r\n
Content-type: text/html; charset=\"windows-1251\"\r\n
Content-Transfer-Encoding: 8bit\r\n"."html текст с тегами и ссылками.".
"--razdel\r\n
Content-Type: application/octet-stream;name=\"file.gif\"\r\n
Content-Transfer-Encoding:base64\r\n
Content-Disposition:attachment;filename=\"file.gif\"\r\n
".chunk_split(base64_encode($file))."\r\n".
"--razdel\r\n
Content-type: text/html; charset=\"windows-1251\"\r\n
Content-Transfer-Encoding: 8bit\r\n"."еще html текста"
, $h);
|
| |
|
|