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);
}
RSS feed for comments on this post · TrackBack URI
Leave a reply