Saturday, June 16, 2012

PHP Mail Function header to avoid spam issue


$headers = "From: \"".$from_name."\" <".$from_email.">\n";
$headers .= "To: \"".$to_name."\" <".$to_email.">\n";
$headers .= "Return-Path: <".$from_email.">\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/HTML; charset=ISO-8859-1\n";

mail($to, $subject, $message, $headers);

No comments:

Post a Comment