I stumbled across a mail script so long ago, I can't remember where. The person who wrote it included a bunch of headers, I might guess every type of header you can possibly use with PHP (but I don't know much about it).

I'd like to know what headers are necessary and which are recommended, whether or not they're they're in this script I have.

I'd also like to know if the ini_set line is necessary.

& if you have any other advice concerning PHP mail, kindly fill me in. Thanks.

PHP Code:


ini_set(sendmail_path"/usr/sbin/sendmail -t -f $from");


$headers "From: $sender_name<$from>\n";
$headers .= "Reply-To: $sender_name<$from>\n";
$headers .= "X-Sender: $sender_name<$from>\n";
$headers .= "X-Mailer: PHP4\n";
$headers .= "X-Priority: 3\n";
$headers .= "Content-Transfer-encoding: 8bit\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "Importance: 3\n";
$headers .= "Date: $date\n";
$headers .= "Delivered-to: $to\n";
$headers .= "Return-Path: $sender_name<$from>\n";
$headers .= "Content-Type: text/plain; charset=UTF-8\n";