Привет форумчане!
Такая проблема! при отправке мейла на яндекс приходит нормально. а при отправки на рабочий имейл(хостинговый) приходят кракозябры! также и с аутлуком(при подключении яндекс почты). Как правильно проставить кодировку?
<html>
<head>
<title>Untitled-12</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" align="center" link="#862212">
<map name="okomp" id="okomp"> <area href="index.html" alt="" link="#FFFFFF" shape="rect" coords="1,1,251,49"/> </map>
<map name="raschet" id="raschet"><area href="contact2.html" alt="" link="#FFFFFF" shape="rect" coords="1,1,269,49"/></map>
<map name="obrat" id="obrat"><area href="Contact.html" alt="" link="#FFFFFF" shape="rect" coords="1,1,319,49"/></map>
<map name="kont" id="kont"><area href="kontakt.html" alt="" link="#FFFFFF" shape="rect" coords="1,1,261,49"/></map>
<table id="Table_01" width="1100" height="900" border="0" cellpadding="0" cellspacing="0" align="center" link="#862212">
<tr>
<td colspan="4">
<img src="images/Untitled-1_01.gif" width="1100" height="166" alt="" ></td>
</tr>
<tr>
<td>
<img border="none" src="images/Untitled-1_02.gif" width="251" height="49" alt="" usemap="#okomp"></td>
<td>
<img border="none" src="images/Untitled-1_03.gif" width="269" height="49" alt=""usemap="#raschet"></td>
<td>
<img border="none" src="images/Untitled-1_04.gif" width="319" height="49" alt=""usemap="#obrat"></td>
<td>
<img border="none" src="images/Untitled-1_05.gif" width="261" height="49" alt="" usemap="#kont"></td>
</tr>
<tr>
<td colspan="4"><div style="position: absolute; margin-left: 150px; margin-top: 30px; left: 34px; top: 219px;" >
<font color="#000000" size = 7 >
<font size = 4> <p>      <strong> RE LOGISTICS</strong></p>
<p style="color:red"><strong>Вы можете отправить нам сообщение, заполнив следующую форму:</strong></p>
<form method="post" action="mail.php">
<p><strong>ФИО:</strong><br>
<input type="text" name="name" size="30">
</p>
<p><strong>Ваш e-mail (для ответа):</strong><br>
<input name="email" type="text" size="30" >
</p>
<p><strong>Организация:</strong><br>
<input name="organizacie" type="text" size="30" >
</p>
<p><strong>Телефон:</strong><br>
<input name="telefon" type="text" size="30" >
</p>
<p><strong>Город:</strong><br>
<input name="adress" type="text" size="30" >
</p>
<p><strong>Ваше сообщение:</strong><br>
<textarea name="mess" rows="5" cols="50"></textarea>
</p>
<input type="submit" value="Отправить сообщение">
</form>
</font>
</div>
<img src="images/Untitled-1_06.gif" width="1100" height="685" alt=""></td>
</tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>
[PHP]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251"/>
<title>Обратная <span class="highlight">связь</span></title>
</head>
<body>
<?php
if (isset($_POST['name'])) {$name = $_POST['name'];}
if (isset($_POST['email'])) {$email = $_POST['email'];}
if (isset($_POST['organizacie'])) {$organizacie = $_POST['organizacie'];}
if (isset($_POST['telefon'])) {$telefon = $_POST['telefon'];}
if (isset($_POST['adress'])) {$adress = $_POST['adress'];}
if (isset($_POST['mess'])) {$mess = $_POST['mess'];}
if (empty($name))
{
echo "<b>Не указано ФИО!<p>";
echo "<a href=contacts.html>Вернуться и правильно заполнить форму.</a>";
}
else
if (empty($email))
{
echo "<b>Не указан e-mail!<p>";
echo "<a href=contacts.html>Вернуться и правильно заполнить форму.</a>";
}
else
if (empty($organizacie))
{
echo "<b>Не указана организация!<p>";
echo "<a href=contacts.html>Вернуться и правильно заполнить форму.</a>";
}
else
if (empty($telefon))
{
echo "<b>Не указан телефон!<p>";
echo "<a href=contacts.html>Вернуться и правильно заполнить форму.</a>";
}
else
if (empty($adress))
{
echo "<b>Не указан адрес!<p>";
echo "<a href=contacts.html>Вернуться и правильно заполнить форму.</a>";
}
else
if (empty($mess))
{
echo "<b>Сообщение не написано!<p>";
echo "<a href=contacts.html>Вернуться и правильно заполнить форму.</a>";
}
else
$to = "мейл"; /*Здесь укажите свой адрес!*/
$charset = "windows-1251";
$content="text/html";
$subject = "Сообщение с вашего сайта";
$message = "ФИО: $name \nЭлектронный адрес: $email \nОрганизация: $organizacie \nТелефон: $telefon \nАдрес: $adress \nСообщение: $mess";
$send = mail ($to,$subject,$message);
if ($send == 'true')
{
echo "<center><b>Спасибо за отправку вашего сообщения<a href=index.html>Нажмите</a>, чтобы вернуться на главную страницу";
}
else
{
echo "<p><b>Ошибка. Сообщение не отправлено!";
}
?>
</body>
</html>[/PHP]