problema con mail e i relativi browser...

hyele

Nuovo Utente
29 Apr 2008
2
0
0
Ringrazio in anticipo chiunque voglia aiutarmi caffe pagato!
Ho uno script per inviare newsletter, ho controllato e ricontrollato,
le email partono correttamente ma non si leggono su outlook express...
che è il browser principale di quasi tutti gli iscritti al servizio.
Il resto è ok. 8registrazione e via di seguito)
vi allego qui l aparte di script incriminata... la conoscenza delle variabili non è fondamentale per capire il senso del tutto:

// SEND ARTICLE BY E-MAIL SUBSCRIPTIONS
function send_article($articleID){
$qwry = "SELECT * FROM ".db('prefix')."articles WHERE id = $articleID"; $qr = mysql_query($qwry);
while ($rs = mysql_fetch_array($qr)) {
$title = $rs['title']; $sef = $rs['seftitle']; $cat = $rs['category']; $text = stripslashes($rs['text']);
$ptext = substr($text,0,strpos($text,'[break]'));}


$name = $cat == 0 ? l('home_sef') : retrieve('seftitle','categories','id', $cat); $url = sprintf('%s/%s/',$name,$sef);
$subject = l('receive_newsletter').s('website_title'); $eol = "\r\n";
$replyname = s('website_title'); $replyemail = s('website_email');
$query = "SELECT * FROM ".db('prefix')."newsletter";
$result = mysql_query($query);

while ($r = mysql_fetch_array($result)) {
$id = $r['id']; $email = $r['email'];
$mime_boundary=md5(time());


$header = "From: ".$replyname." <".$replyemail.">".$eol;
$header .= "Reply-To: ".$replyname." <".$replyemail.">".$eol;
$header .= "Return-Path: ".$replyname." <".$replyemail.">\r\n";
$header .= "Message-ID: <".time().".".$replyemail.">\r\nX-Mailer: PHP v".phpversion().$eol;

$header .= "MIME-Version: 1.0".$eol;
$header .= "Content-type: text/plain; charset=".s('charset')."\n";
$header .= "Content-Type: multipart/alternative;\r\n boundary=\"----=_Part_".$mime_boundary."\"".$eol.$eol;

$msg = "------=_Part_".$mime_boundary.$eol;

# Text Version
$msg .= "Content-Type: text/plain; charset=".s('charset').$eol;
$msg .= "Content-Transfer-Encoding: quoted-printable".$eol.$eol;
$msg .= "Messaggio in formato testo, il tuo browser non supporta HTML format".$eol;

$msg = "------=_Part_".$mime_boundary.$eol;

# HTML Version
$msg .= "Content-Type: text/html; charset=".s('charset').$eol;
$msg .= "Content-Transfer-Encoding: quoted-printable".$eol.$eol;
// $msg = "------=_Part_".$mime_boundary.$eol

$msg .= "<html>\n";
$msg .= "<body style =\"background-color: #F2F2F2; font-family: arial, sans-serif; font-size: .8em; color: #808080; padding: 0; margin: 0\">";

$txt = sprintf('id=%s&email=%s', "=".$id, "=".md5($email));
$unsubscribe = sprintf('id=%s&email=%s', $id, md5($email));

# logo uilpa509.it
$msg .="<font size=\"130%\">Uilpa509.it Newsletter</font>";

// $msg .= "<h3><a href=\"".sprintf(db('website').'%s',$url)."\">".$title."</a></h3>";
$msg .= "<h3><a href=".ht.sprintf(db('website').'%s',$url).">".$title."</a></h3>";



$msg .= $ptext;
$msg .= "<br><br>";


# prove sul link all'articolo
# original line $msg .= sprintf(db('website').'%s', $url)."<br /><br />";
$msg .= "<h2><a href= ".h.sprintf(db('website').'%s', $url).">Leggi tutto l'articolo...</a></h2>";
$msg .= "<hr>";
$msg .= "<h6>".l('newsletter_info1')." ".$email."<br /><br />".l('newsletter_info2')."<br /><br />";
$msg .= sprintf(db('website').'remove_newsletter&%s',$txt)."<br /><br />";
$msg .= l('newsletter_info3')."<br /><br />".l('newsletter_info4')."</h6>";
$msg .= "</body>\n";
$msg .= "</html>\n";

//close the html/plain text alternate portion
$msg .= "------=_Part_".$mime_boundary."--".$eol.$eol;
# SEND THE EMAIL
mail( $email, $subject, $msg, $header );}
}
 
Discussioni simili
Autore Titolo Forum Risposte Data
Marti1! Problema con casella mail cancellata Posta Elettronica 3
A [PHP] Problema invio mail con funzione mail() PHP 3
filomeni Problema con mail() in html PHP 4
S Problema con Mail PHP 3
V problema con mail e php PHP 6
L problema email con funzione mail PHP 1
F Problema con mail in SPAM Hosting 2
C problema invio mail con form php PHP 0
A Problema con mail() PHP 2
C AJAX FORM MAIL - problema con gli a capo nel messaggio Javascript 0
L Problema invio allegati via mail con libero PHP 5
P Problema con la funzione mail PHP 13
V Problema con l'invio delle mail in locale (usando quindi easy php) PHP 16
Angel0 Problema invio e-mail (era: problemi con xoom) Posta Elettronica 4
D Problema con allegato tramite form mail PHP 2
N problema:mail con allegato a piu utenti da db PHP 17
B Problema invio mail con script php verso i dominii libero PHP 9
G problema con mail() PHP 2
R Form Mail: Problema con Frame Supporto Mr.Webmaster 4
M problema con form mail Flash 2
A problema con mail PHP 0
djfulmine Problema con PHP e Server Mail PHP 1
A problema con invio e-mail con CDONTS Classic ASP 0
V problema con invio mail Hosting 2
L problema mail con asp Classic ASP 15
O problema con dvr dahua xvr5116 IP Cam e Videosorveglianza 0
G Problema con Xampp Web Server 1
andrea barletta Problema con miniature comandi Photoshop 0
I problema con alice Posta Elettronica 0
N Problema con position absolute e overflow HTML e CSS 4
L Problema con inner join PHP 11
K [php] Problema con inner join PHP 4
K [PHP] Problema con variabili concatenate. PHP 1
O problema con query PHP 4
I problema con 2 account Posta Elettronica 1
L problema collegamento file css con html HTML e CSS 1
E Problema accesso a file con app sviluppata con MIT APP INVENTOR 2 Sviluppo app per Android 0
M Problema con Try Catch PHP 0
Sergio Unia Problema con gli eventi del mouse su una data table: Javascript 2
T PROBLEMA CON SESSIONI PHP 3
T ALTRO PROBLEMA CON ARRAY PHP PHP 1
R problema con else PHP 0
T PROBLEMA CON ARRAY PHP 8
L problema con query select PHP 2
R Problema query con ricerca id numerico PHP 2
F Problema con risposta PHP 0
S problema con recupero dati tabella mysql PHP 2
Z Problema con il mio tp-l i nk Reti LAN e Wireless 1
L Problema RAM con Tomcat 8 Apache 0
napuleone problema con sort e asort PHP 4

Discussioni simili