Do not receive letters from the form to the mail domain, what could be the problem? The paths to the eshkn on the buttons are correctly set, checked everything, and in general it worked before.

HTML:

<div class="signup-header"> <form class="form-header" action="contactengine.php" role="form" method="POST" id="#"> <input type="hidden" name="u" value="503bdae81fde8612ff4944435"> <input type="hidden" name="id" value="bfdba52708"> <div class="form-group"> <input class="form-control input-lg" name="name" id="name" type="text" placeholder="Name" required> </div> <div class="form-group"> <input class="form-control input-lg" name="telephone" id="telephone" type="tel" placeholder="Phone" required> </div> <div class="form-group last"> <input type="submit" class="btn btn-warning btn-block btn-lg" value="Send"> </div> </form> </div> 

PHP:

 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ Ρ„ΠΎΡ€ΠΌΡ‹ ΠΎΠ±Ρ€Π°Ρ‚Π½ΠΎΠΉ связи</title> <meta http-equiv="Refresh" content="1; URL=http://сайт"> </head> <body> <?php $sendto = "ΠΏΠΎΡ‡Ρ‚Π° ΠΊΡƒΠ΄Π°"; // ΠΏΠΎΡ‡Ρ‚Π°, Π½Π° ΠΊΠΎΡ‚ΠΎΡ€ΡƒΡŽ Π±ΡƒΠ΄Π΅Ρ‚ ΠΏΡ€ΠΈΡ…ΠΎΠ΄ΠΈΡ‚ΡŒ письмо $username = $_POST['name']; // сохраняСм Π² ΠΏΠ΅Ρ€Π΅ΠΌΠ΅Π½Π½ΡƒΡŽ Π΄Π°Π½Π½Ρ‹Π΅ ΠΏΠΎΠ»ΡƒΡ‡Π΅Π½Π½Ρ‹Π΅ ΠΈΠ· поля c ΠΈΠΌΠ΅Π½Π΅ΠΌ $usertel = $_POST['telephone']; // сохраняСм Π² ΠΏΠ΅Ρ€Π΅ΠΌΠ΅Π½Π½ΡƒΡŽ Π΄Π°Π½Π½Ρ‹Π΅ ΠΏΠΎΠ»ΡƒΡ‡Π΅Π½Π½Ρ‹Π΅ ΠΈΠ· поля c Ρ‚Π΅Π»Π΅Ρ„ΠΎΠ½Π½Ρ‹ΠΌ Π½ΠΎΠΌΠ΅Ρ€ΠΎΠΌ $message = $_POST['message']; // Π€ΠΎΡ€ΠΌΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅ Π·Π°Π³ΠΎΠ»ΠΎΠ²ΠΊΠ° письма $subject = "Заявка с сайта"; $headers = "From: " . strip_tags("ΠΏΠΎΡ‡Ρ‚Π° ΠΊΡƒΠ΄Π°") . "\r\n"; $headers .= "Reply-To: ". strip_tags("ΠΏΠΎΡ‡Ρ‚Π° ΠΊΡƒΠ΄Π°") . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html;charset=utf-8 \r\n"; // Π€ΠΎΡ€ΠΌΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅ Ρ‚Π΅Π»Π° письма $msg = "<html><body style='font-family:Arial,sans-serif;'>"; $msg .= "<h2 style='font-weight:bold;border-bottom:1px dotted #ccc;'>CΠΎΠΎΠ±Ρ‰Π΅Π½ΠΈΠ΅ с сайта</h2>\r\n"; $msg .= "<p><strong>ΠžΡ‚ ΠΊΠΎΠ³ΠΎ:</strong> ".$username."</p>\r\n"; $msg .= "<p><strong>Π’Π΅Π»Π΅Ρ„ΠΎΠ½:</strong> ".$usertel."</p>\r\n"; $msg .= "<p><strong>Π‘ΠΎΠΎΠ±Ρ‰Π΅Π½ΠΈΠ΅:</strong> ".$message."</p>\r\n"; $msg .= "</body></html>"; // ΠΎΡ‚ΠΏΡ€Π°Π²ΠΊΠ° сообщСния if(@mail($sendto, $subject, $msg, $headers)) { echo "<center>Бпасибо, ΠΌΡ‹ свяТСмся с Π’Π°ΠΌΠΈ Π² блиТайшСС врСмя!</center>"; } else { echo "<center>ΠŸΡ€ΠΈΠ·ΠΎΡˆΠ»Π° ошибка, ΠΏΠΎΠΏΡ€ΠΎΠ±ΡƒΠΉΡ‚Π΅ снова!</center>"; } ?> </body> </html> 

  • Look at the server error log. Look in the spam mailbox folder. And the headers To , From and Reply-To do you have the same? - Visman
  • First, remove @ @mail () - why are you hiding errors? maybe there is a solution ... Secondly, in general, hosting services begin not to support sending mail through mail (), and thirdly, use SMTP - Arsen
  • The headers are the same, in the spam folder is empty, in the hosting support they say that it should work, it is strange. - Alice Khip
  • something changed? The code itself does not stop working. In extreme cases, ping the mail server, the hoster sometimes lies. - Kirill Korushkin
  • I did not change anything, even the old version was flooded, the very first one - everything worked. Apparently the problem is on the part of the hoster, I will write to the support. - Alice Khip

1 answer 1

Solved the problem, incorrectly uploaded through the built-in admin panel (uploaded files to the archive and unpacked it on the hosting - it all worked).