I use a simple mail function for a contact form in my website.
$name = stripslashes($_POST['name']);
$email = trim($_POST['email']);
$text = stripslashes($_POST['message']);
$message = '<html><body>'.nl2br($text)."</body></html>";
$mail = mail("info@domain.com", "Contact Form", $message,
"From: ".$name." <".$email.">\r\n"
."Reply-To: ".$email."\r\n"
."X-Mailer: PHP/" . phpversion()
."MIME-Version: 1.0\r\n"
."Content-Type: text/html; charset=utf-8");
The email is send BUT it is always detected as Spam which is not good. Probably because the "FROM" is the email given by the visitor in the form.
How to solve this?