Answer the question
In order to leave comments, you need to log in
Why do gibberish messages come to The bat and Outlook, but normal to mail services?
<?
header('Content-Type: text/html; charset=utf-8');
$kuda = '[email protected]';
$zagolovok = 'Сообщение с сайта';
$headers = 'Content-type: text; charset="utf-8"';
if (isset($_POST['ok'])){
$fio = $_POST['fio'];
$email = $_POST['email'];
$tel = $_POST['tel'];
$text = $_POST['text'];
$messages = "E-Mail: {$email}\n";
$messages .= "Номер: {$tel}\n";
$messages .= "ФИО: {$fio}\n\n";
$messages .= "{$text}";
if (mail($kuda, $zagolovok, $messages, $headers)) {
echo 'Отправлено';
}
}
?>
Answer the question
In order to leave comments, you need to log in
$zagolovok = '=?utf-8?B?'.base64_encode('Сообщение с сайта').'?=';
$headers = "Content-type: text/plain; charset=\"utf-8\"\r\n".
"Content-transfer-encoding: 8bit";
try to replace utf-8 with windows-1251 bkb cp1251 and send something changed?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question