Codice PHP:
// Compose the msg and mail the activation link
$msg file_get_contents("mailtemplates/newpost.txt");
$msg str_replace("{@SITENAME}"$site_name$msg);
$msg str_replace("{@SITEURL}"$script_url$msg);

$headers  'MIME-Version: 1.0' "\r\n"
$headers .= 'Content-type: text/html; charset=iso-8859-1' "\r\n";

//Alla fine, dove usi la funzione mail(), sostituisci così:
mail($a$oggetto$msg$headers); 
Ecco fatto