Answer the question
In order to leave comments, you need to log in
Why did the feedback form stop working?
I would be very grateful if someone tells me what needs to be changed to make the form work again:
PHP:
<?php
$email_to = "[email protected]";
$email_subject = "Message from website";
//$_POST['name'];
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$email_message = "Name: " . $name . "\n";
$email_message .= "Email: " . $email. "\n";
$email_message .= "Message: " . $message. "\n";
mail($email_to, $email_subject, $email_message);
?>
Thanks!
Answer the question
In order to leave comments, you need to log in
Good afternoon!
I'm not ready to help with the code, but in my case the form stopped working because the site contained a virus script that sent emails. The hoster limited the number of emails sent to 100. This limit was used up by the malware script in seconds, and sending emails to my email from the feedback form was blocked because the limits had been exhausted.
$email_to = "[email protected]";
$email_subject = "Сообщение с сайта";
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
//$_POST['name'];
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$email_message = "Имя: " . $name . "\n";
$email_message .= "Email: " . $email . "\n";
$email_message .= "Сообщение: " . $message . "\n";
mail($email_to, $email_subject, $email_message,$headers);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question