index.html

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <form action="send.php" method="post"> <input type="text" name="name" placeholder="name"> <input type="text" name="number" placeholder="number"> <input type="submit" value="Send"> </form> </body> </html> 

send.php

 <?php $email="xxxx@email.ua"; $name=$_POST['name']; $phone=$_POST['number']; mail($email, $name, $phone); ?> 

There is a simple form, and a simple dispatch code. Nothing comes to mail.

  • For clarification: I work on OpenServer. Maybe this is due to the fact that the locale of the host can not be sent? - Matt Hale

1 answer 1

OpenServer saves sent messages locally. C # \ openserver \ userdata \ tmp \ email to this folder

To send mail to a real box, you need to configure OpenServer (Settings \ Mail \ SMPT server)

  • Thank. Indeed it is. By default, the real mailing is disabled, the letters are saved in the logs. Understood - Matt Hale