<?php
$recepient = "index@mail.ru";
$sitename = "Butik";
$email= trim($_POST["email"]);
$message = "Телефон: $email";
$pagetitle = "Новая заявка с сайта \"$sitename\"";
mail($recepient, $pagetitle, $message, "Content-type: text/plain; charset=\"utf-8\"\n From: $recepient");
$recepient = "index@mail.ru";
$sitename = "Butik";
$email= trim($_POST["email"]);
$message = "Телефон: $email";
$pagetitle = "Новая заявка с сайта \"$sitename\"";
mail($recepient, $pagetitle, $message, "Content-type: text/plain; charset=\"utf-8\"\n From: $recepient");
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
mail(
$email,
'Thank you!',
'Thank you! \r\n We will call you back now! Wait.', // ваш шаблон письма
"Content-type: text/plain; charset=\"utf-8\"\n From: $recepient"
);
}