I need a set of mail headers to attach to my
mail() function in PHP. I send emails with HTML in them, and sometimes services like Yahoo Mail block them. Therefore I need to make sure that I am at least providing the right headers.
// To send HTML mail, the 'Content-type' header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'From: MyCompany <firstname.lastname@example.org>' . "\r\n";
Is there anything else I should add?