I have a little form where the website visitor can enter his email to subscribe for a newsletter. My goal is to make the form send me an email with the information he entered.
My problem is every single e-mail I get goes straight to the Junk folder.
HTML:
<form class="subscribe" action="subscribe.php" method="POST">
<input type="text" name="subscribefield" required="true" placeholder="Awe" />
<button type="submit"><i class="fa fa-paper-plane fa-lg" aria-hidden="true"></i>
</button>
</form>
PHP:
<?php
$email = $_POST['subscribefield'];
$to = "test@live.com";
$subject = "new sub";
$body = $email;
mail($to, $subject, $body);
echo "your mail was sent";
?>