<?
$g_mail = "mail@domain.com";
$s_name = "Some name";
$to = "Receiver <receiver@domain.com>";
$subject = "Some subject";
$message= "HTML codes here. Write anything you want including " . $_POST['data'];
$header = "From: $s_name <".$g_mail.">\n";
$header .= "Reply-To: $s_name <".$g_mail.">\n";
$header .= "Return-Path: $s_name <".$g_mail.">\n";
$header .= "Delivered-to: $s_name <".$g_mail.">\n";
$header .= "Date: ".date(r)."\n";
$header .= "Content-Type: text/html; charset=iso-8859-9\n";
$header .= "MIME-Version: 1.0\n";
$header .= "Importance: Normal\n";
$header .= "X-Sender: $s_name <".$g_mail.">\n";
$header .= "X-Priority: 3\n";
$header .= "X-MSMail-Priority: Normal\n";
$header .= "X-Mailer: Microsoft Office Outlook, Build 11.0.5510\n";
$header .= "X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869\n";
mail($to, $subject, $message, $header);
?>
これは、私が通常使用するメール スクリプトです。ほとんどのメール プロバイダーでもスパムとしてマークされません。