Blank emails when trying otpraviti php mail(). how to fix?

Made on its website in the form of the application
<form action="/mail.php" method="POST" class="contact-form" enctype="multipart/form-data">
 <div class="row">
 <div class="form-group col-md-6 col-lg-6 col-xl-6">
 <input type="text" id="message contact_name" name="name" class="form-control" placeholder="Your name" required>
 <div class="form-group col-md-6 col-lg-6 col-xl-6 tm-col-email">
 <input type="email" id="contact_email" name="email" class="form-control" placeholder="E-mail" required>
 <div class="form-group">
 <textarea id="contact_message" name="message" class="form-control" rows="9" placeholder="Message" required></textarea>
 <button type="submit" class="btn btn-primary tm-btn-submit">Send</button>

and put the PHP handler
$headers = 'From: Mister-Apple\r\n ';
 'Reply-To: Roman\r\n ';
$theme = 'Ordering';
$letter = 'message Data:\r\n';
$letter .='Name:'.$_POST['name'].'\r\n';
$letter .='Mail:'.$_POST['email'].'\r\n';
$letter .='Message:'.$_POST['message'].'\r\n';
mail('', $theme , $letter );

but mail to the Department of spam e-mails with the title " a New application from website "Name of website" "and with content" you want to contact a user with email: "(direct quote)
error in the word "wants," wrote a form not I , but the important thing is that it is empty
he never worked with php
June 3rd 19 at 19:23
2 answers
June 3rd 19 at 19:25
He found the answer
June 3rd 19 at 19:27
Judging by what you quoted phrase neither in the code nor in the form of no, does not work your php script, and some other.
in a file called mail.php and written a handler - keon.Boyer54 commented on June 3rd 19 at 19:30
there are no more responses? - keon.Boyer54 commented on June 3rd 19 at 19:33
And this file is exactly located in the root directory of the site? - Kenyatta commented on June 3rd 19 at 19:36
and what else to say? is not running your script without a project structure and code is guesswork. - lily.Kozey commented on June 3rd 19 at 19:39
put the script in the site root and in the directory where the executed file - keon.Boyer54 commented on June 3rd 19 at 19:42

Find more questions by tags E-mailHTMLPHP