Jump to content


This topic is now archived and is closed to further replies.


mail() function and spam filters

Recommended Posts

I have a user registration system .. where users receive an email and have to click on the link to validate their account .. but a lot say they never received the validation email .. I think this is because my mail is getting filtered out by their server's spam filter .. is the anything I could do to prevent this?

Here is what my mail to script looks like

$headers .= "X-Sender:  $mail <$mail>\n"; //
$headers .="From: $maili <$maili>\n";
$headers .= "Reply-To: $maili <$maili>\n";
$headers .= "Date: ".date("r")."\n";
$headers .= "Message-ID: <".date("YmdHis")."selman@".$_SERVER['SERVER_NAME'].">\n";
$headers .= "Subject: $subject\n"; // subject write here
$headers .= "Return-Path: $maili <$maili>\n";
$headers .= "Delivered-to: $maili <$maili>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "X-Priority: 1\n";
$headers .= "Importance: High\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "X-Mailer: SelmanD Mailler With PHP!\n";
/* send mail */
mail($mail, $subject , $message, $headers);[/code]

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.