ho uno script per l'invio di mail automatiche in php, mi serve per una newsletter.
il problema è che la visualizzazione su siti come libero va bene, ma su client come outlook no.quale può essere il problema?
il codice che uso è questo:
Codice PHP:
$org_var="Titolo mittente";
$maili="info@miosito.it";
$content="$testo
<img src=\"http://www.miosito.it/newsletter/utenti/$immagine\">
mandata da $maili ";
$content = STR_REPLACE("<PRE>","
",$content);
$content = STR_REPLACE("</PRE>","</p>",$content);
$content = STR_REPLACE("<XMP>","",$content);
$content = STR_REPLACE("</XMP>","",$content);
$content = stripslashes($content);
$content = STR_REPLACE("'","’",$content);
$body = "<html><body>\n".$content."\n</body></html>";
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/html; charset=iso-8859-1\r\n";
$header .= "Organization: ".$org_var."\r\n";
$header .= "Content-Transfer-encoding: 8bit\r\n";
$header .= "To: ".$mail."\r\n";
$header .= "From: ".$org_var." <".$maili.">\r\n";
$header .= "Reply-To: ".$org_var." <".$mail.">\r\n";
$header .= "Message-ID: <".md5(uniqid(time()))."@{$_SERVER['SERVER_NAME']}>\r\n";
$header .= "Return-Path: ".$maili."\r\n";
$header .= "X-Priority: 1\r\n";
$header .= "X-MSmail-Priority: High\r\n";
$header .= "X-Mailer: Microsoft Office Outlook, Build 11.0.5510\r\n"; //hotmail and others dont like PHP mailer.
$header .= "X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441\r\n";
$header .= "X-Sender: ".$maili."\r\n";
$header .= "X-AntiAbuse: This is a solicited email for - ".$org_var." mailing list.\r\n";
$header .= "X-AntiAbuse: Servername - {$_SERVER['SERVER_NAME']}\r\n";
$header .= "X-AntiAbuse: User - ".$maili."\r\n";
$bodyToSend=$body;
mail ("$mail","Newsletter",$bodyToSend,$header);
Quale può essere il problema?oppure datemi qualche dritta grazie.