I make a form of sending a letter to the mail from the site. How to do and what to register in the function so that the letters come to the mail in the form of html?
In addition, even simple text comes in a letter to an abracadabra, this is on mail.ru mail, and on yandex.ru everything is fine.
How to solve the problem?
The code is:
if(!isset($hasError)) { $emailTo = 'mail@mail.ru'; //Сюда введите Ваш email $body = "Вам поступил заказ с сайта Вектор-М на: \nПакет $vid_pack $color_view \n\nПараметры: \n\nШирина:$width мм \n\nДлина:$length мм \n\nТолщина:$thickness мкм \n\nКоличеством: $quantity шт.\nпо цене $price руб/шт. на общую сумму $summa руб. \n\nКонтактные данные: \n\nИмя:$contactname \n\nТелефон:$phone \n\nE-mail:$email \n\nПримечание:\n$message\n "; $headers = 'From: Форма заказа с сайта Вектор-М <'.$emailTo.'>' . "\r\n" . 'Reply-To: ' . $email; mail($emailTo, $subject, $body, $headers); $emailSent = true; } else { exit ("<p>Вы заполнили не все обязательные поля, вернитесь назад и заполните все обязательные поля.<br><input name='back' type='button' value='Вернуться назад' onclick='javascript:self.back();'></p>"); } }