My PHP mail works properly with normal email, but with spam protect like Yahoo it is mark as Spam. Do you guy know why? This is my code: // send email; // $content_main $to = "$customer_email"; $subject = $LG["word_hi"]. $customer_name; $headers = ""; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=utf-8\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "From: $admin_name <$admin_email> \r\n" . "To: $customer_name <$customer_email> \r\n" . "Reply-to: <$admin_email> \r\n" . "Return-path: <$admin_email> \r\n" . "X-Mailer: PHP/" . phpversion(); $message = $LG["word_dear"]." $customer_name ." --------------------------<br> $content_main <br>----------------------------<br>". $LG["email_goodbye"]; mail($to, $subject, $message, $headers);
There are many things that contribute to marking a mail as spam. One of the main ones is Content-type: text/html. You have to make a lot of tests before managing to get your email out of spam, and even then, it won't be for long
Have a look at this topic, Mab gives some really good tips. http://www.programmingtalk.com/showthread.php?t=40061