Answer the question
In order to leave comments, you need to log in
php mail text formatting?
How to send letters with formatted text to soap via mail?
<?php
if($_POST['submit']) {
$phone = substr(htmlspecialchars(trim($_POST['phone'])), 0, 1000);
$name = substr(htmlspecialchars(trim($_POST['name'])), 0, 1000);
$message = "Телефон: ".$phone."
ФИО:".$name;
mail('[email protected]', 'Новый заказ!', $message);
}
?>
Answer the question
In order to leave comments, you need to log in
$headers= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
mail($to, $subject, $message, $headers);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question