Page 1 of 1

What headers would I use with mail() to enable HTML?

Posted: Tue Jan 16, 2007 7:40 am
by impulse()
At the moment, my headers section is as follows:

Code: Select all

$headers = ""; 
    $headers .= "Content-Type: text/html; charset=iso-8559-1";
    $headers .= "Content-Transfer-Encoding: 8bit";
But this isn't using HTML tags.

Regards,

Posted: Tue Jan 16, 2007 8:06 am
by Grim...
Live and direct from the PHP Manual:

Code: Select all

// 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";

// Mail it
mail($to, $subject, $message, $headers);