premetto di aver fatto le verifiche su hotmail ecc...
ottenendo buoni risultati...
e utilizzando un codice meno accurato del tuo...
guarda:
[applico il mio metodo al tuo codice...]
Come vedi, non tratto in maniera particolare gli headers...Codice PHP:<?
function send_mail($email,$subject,$body_html,$body_txt,$mittente,$file_path_and_name="",$new_file_name=""){
$headers = "MIME-Version: 1.0\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\n";
$headers.= "From: Promemoria Compleanni <compleanni@example.com>\n";
//allegato se presente
if ($file_path_and_name != "") {
$open_file = fopen($file_path_and_name, "r");
$data = fread($open_file, filesize($file_path_and_name));
$encoded_attach = base64_encode($data);
fclose($open_file);
$file_name = array_pop(explode('/',$file_path_and_name));
if ($new_file_name == "") $new_file_name = $file_name;
$file_type = mime_content_type($file_path_and_name);
$body.= "\n\r--$boundary_1\n";
$body.= "Content-type: $file_type; name=\"$file_name\"\n";
$body.= "Content-Transfer-Encoding: base64\n";
$body.= "Content-Disposition: attachment; filename=\"$new_file_name\"\n\n";
$body.= "$encoded_attach\n";
$body.= "\n\r--$boundary_1--\n";
}
if(@mail($email,$subject,$body,$headers)) return true; else return false;
}
?>
ciò su cui dicevo di poterti aiutare, invece, era proprio il testo della mail... la pagina HTML che inviavi insomma... perchè così ti dicevo quali style convertire e come


Rispondi quotando