aRo` automating your e-commerce

This blog has been neglected due to the success of Solidshops.com
28Jan/06

How to send mail without getting caught by a spamfilter

When i was doing some small mail campaigns for a forum i run, i noticed a lot of mail got trapped in the junkmail folder. This was the case with hotmail, yahoo, …

After searching for a solution i found a header modification of the mail message.

function SendYourMail($to,$from,$subject,$message){

$headers=”";
$headers .= “X-Sender: $mail <$mail>\n”; //
$headers .=”From: $from <$from>\n”;
$headers .= “Reply-To: $from <$from>\n”;
$headers .= “Date: “.date(“r”).”\n”;
$headers .= “Message-ID: <".date("YmdHis")."$from>\n”;
$headers .= “Subject: $subject\n”; // subject write here
$headers .= “Return-Path: $from <$from>\n”;
$headers .= “Delivered-to: $from <$from>\n”;
$headers .= “MIME-Version: 1.0\n”;
$headers .= “Content-type: text/html;charset=ISO-8859-9\n”;
$headers .= “X-MSMail-Priority: Normal\n”;
$headers .= “X-Mailer: Mail send from yourdomain.com!\n”;

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

Popularity: 6% [?]

Filed under: php No Comments