Я хочу добавить «Это сообщение пришло от etcetc.com» в форме электронной почты в самом теле электронной почты. Надеюсь, что это имеет смысл ..Как добавить пользовательское сообщение в мою почтовую форму формы
мой sent_email.php
<?php
$email_to = '[email protected]';
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$headers = 'From: ' . $name . ' <' . $email . '>' . "\r\n" . 'Reply-To: ' . $email;
if(mail($email_to, $subject, $message, $headers)) {
echo 'sent'; // we are sending this text to the ajax request telling it that the mail is sent..
} else {
echo 'failed'; // ... or this one to tell it that it wasn't sent
}
?>
И в чем проблема, с которой вы столкнулись? – Jasper
Рассмотрите возможность добавления в '$ message' – karthikr