hi, I'm newbie in this forum ..hallo to all
i've one problem:
My newsletters don't work!!
i post the code:
This code work good!
<?php
//TESTO DELLA MAIL
$mess="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<HTML><HEAD>
<META http-equiv=Content-Type content=\"text/html; charset=iso-8859-1\">
<STYLE>
H5 {text-align: justify; text-decoration: none; color: #333333; font-size: 12px; font-family: Arial}
A:link, A:visited, A:hover { color: #FFCC00 }
</STYLE>
</HEAD>
<BODY bgcolor=#FFFFFF link=#333333 alink=#333333 vlink=#333333>
<DIV><h5>Testo dell'email con tutti i tag HTML</h5>
</BODY></HTML>";
//INTESTAZIONE - MITTENTE
$headers.="From: Nome mittente<info@tuosito.it>\n";
$headers.="Content-Type: text/html; charset=iso-8859-1\n";
//DESTINATARIO E SOGGETTO
$destinatario="pippo@pippo.it";
$soggetto="Soggetto della mail";
echo "Invio della mail ";
if(!(@mail($destinatario,$soggetto,$mess,$headers))){
print"<H5><b>fallito!</b><p></H5>";
}else{
echo "<font color='#000000'>eseguito correttamente!<p>";
}
?>
this code don't work! 😕 :mad:
<?php
// formattazione HTML delle emails
$mess="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<HTML><HEAD>
<META http-equiv=Content-Type content=\"text/html; charset=iso-8859-1\">
<STYLE>
H5 {text-align: justify; text-decoration: none; color: #333333; font-size: 12px; font-family: Arial}
A:link, A:visited, A:hover { color: #FFCC00 }
</STYLE>
</HEAD>
<BODY bgcolor=#FFFFFF link=#333333 alink=#333333 vlink=#333333>
<DIV><h5>Testo dell'email con tutti i tag HTML</h5>
</BODY></HTML>";
// anteprima testo email
if ($r1 != "si" ){
echo "anteprima newsletters<br><br>\n";
echo "$mess <br><br><br>\n
<form name=\"form1\" method=\"post\" action=\"#\">\n
<font size=\"2\" face=\"Tahoma\">Iviare emails?</font><br>\n
<font size=\"2\" face=\"Tahoma\"> \n
<input type=\"radio\" name=\"r1\" value=\"si\">\n
SI
<input type=\"submit\" name=\"Submit\" value=\"Invia emails\"></font>\n
</form>
";
}else{
//INTESTAZIONE - MITTENTE
$headers.="From: Nome mittente<info@tuosito.it>\n";
$headers.="Content-Type: text/html; charset=iso-8859-1\n";
//DESTINATARIO E SOGGETTO
$email_list = file("email.txt");
$soggetto="Soggetto della mail";
echo "<font color='#000000' size=\"2\" face=\"Tahoma\">Elenco email inviate:</font><br><br>\n";
while (list ($key,$destinatario) = each($email_list)) {
$destinatario = str_replace("\r\n","",$destinatario);
if(!(@mail($destinatario,$soggetto,$mess,$headers))){
echo "<H5><b>Fallito l'invio a {$destinatario}!</b><p></H5>";
}else{
echo "<font color='#000000' size=\"2\" face=\"Tahoma\">Invio a {$destinatario} eseguito correttamente!<br></font>";
}
}
echo "<br><br><font color='#000000' size=\"2\" face=\"Tahoma\"><a href=\"index.htm\">menu newsletters</a></font>";
}
?>
i don't know becouse this code don't work... i give the result:
Subject: Soggetto della mail
From: Nome mittente<info@tuosito.it>
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE>
H5 {text-align: justify; text-decoration: none; color: #333333; font-size: 12px; font-family: Arial}
A:link, A:visited, A:hover { color: #FFCC00 }
</STYLE>
</HEAD>
<BODY bgcolor=#FFFFFF link=#333333 alink=#333333 vlink=#333333>
<DIV><h5>Testo dell'email con tutti i tag HTML</h5>
</BODY></HTML>
i think all problem is in the headers .. outlook don't read it! help pls
tnk for all help!!