Nogrogomed
Новичок
Вот мой пример:
Все работает
-~{}~ 07.02.06 18:01:
вместо сообщения создал тему....
Удалите ее, плиз
Вот нужное сообщение
http://phpclub.ru/talk/showthread.php?postid=574342#post574342
PHP:
$email="[email protected]";
$soob=<<<END
<html><body>
что-то
</body>
</html>
END;
$__boundary = md5(rand(0, time()));
$headers = "From: [email][email protected][/email]
Subject: test
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=\"{$__boundary}\"
";
$file_block="";
if ($_FILES['fail']['name'])
{
$file=file_get_contents($_FILES['fail']['tmp_name']);
$file_block="
--{$__boundary}.
Content-Type: application/octet-stream; name=\"{$_FILES['fail']['name']}\"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=\"{$_FILES['fail']['name']}\"
{$file}";
}
$message="--{$__boundary}
Content-Type: text/html
{$soob}" . $file_block . "
--{$__boundary}--
";
echo $message;
if (mail($email, "test", $message, $headers))
{
$msg="Отправилось";
}
else
{
$msg="Не отправилось";
}
echo $msg;
-~{}~ 07.02.06 18:01:
вместо сообщения создал тему....
Удалите ее, плиз
Вот нужное сообщение
http://phpclub.ru/talk/showthread.php?postid=574342#post574342