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);
}
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Nov | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||
RSS feed for comments on this post · TrackBack URI
Leave a reply