![Cool](http://static.forosdelweb.com/fdwtheme/images/smilies/cool.png)
el script es el siguiente:
Código PHP:
<?
include("config.php");
/// ejecutor 2 envia los mails con los texto_portadas y susrespectivos links
//------------------------------------- seleciono la nota!!!!!
$db = mysql_connect($host, $usuario,$password);
mysql_select_db($database,$db);
$sql = "SELECT * FROM notas WHERE fecha = '$hiddefecha' ORDER BY codigo";
$result = mysql_query($sql,$db);
// $myrow = mysql_fetch_array($result);
$mailer_head= "<html>\n<head>\n
<title>Newsletter </title>\n
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n
</head> \n
<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"500\" id=\"AutoNumber1\" height=\"68\">\n
<tr>";
while ($myrow = mysql_fetch_array($result)){
$fecha_nota= $myrow["fecha"];
$separar = explode('-', $fecha_nota);
$main[] = "
<center>
<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"500\" id=\"AutoNumber1\" >\n
<tr>
<hr>
:::<b> $myrow[titulo] </b>:::
<p style=\"line-height: 30%\">Fuente: $myrow[fuente] $fecha_nota </p>
<a href=\"http://www.misnews.com.ar/index.php?id=10&mostrar=$myrow[codigo]\"> $myrow[texto_portada] ( Leer Mas ... ) </a>
</center>
";
} // cierro el bucle del main
$mailer_foot="</tr></table></body></html>";
//--------------------------------- aca termina el formato de la nota
$muestro = count($sop);
for ($i=0; $i < $muestro; $i++){
//$sfrom="From: NewsletterSantafe.com.ar\nContent-Type: text/html; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit\n";
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: Newsletter <[email protected]>\r\n";
/* additional headers */
$cantidad = count($main);
for ($as=0; $as<$cantidad ;$as++) { /// abro el for
$mailer_main = $mailer_main.$main[$as]."<br>\n";
} /// cierro el for
$to_mail = "<center><img border=\"0\" src=\"http://www.misnews.com.ar/admin/images/logo2.gif\" width=\"500\" height=\"20\"></center>".$mailer_main ;
//echo "<br>";
// echo $mailer_main."<br>";
// echo $mailer_foot."<br>";
mail("$sop[$i]","Newsletter ","$to_mail","$headers");
echo $sop[$i]."<br>" ;
echo $hiddefecha."<br>";
}
?>
acepto sugerencias que no sean muy dificiles de implementar, yo lo vendo al sistema este y ahora me quieren matar por este error
saludos desde argentina
![borracho](http://static.forosdelweb.com/fdwtheme/images/smilies/borracho.png)
![borracho](http://static.forosdelweb.com/fdwtheme/images/smilies/borracho.png)