13/11/2003, 15:43
|
|
He puesto las cabeceras que me aconsejasteis pero sigue sin funcionarme. El último enlace que hice me apareció así: \http://mercadoeninternet.com/cgi-bin...gi?id=soloweb\"
Os adjunto el código PHP para enviar los emails a mis listeros de correo a ver si encontrais el problema. Código PHP: <? include ("seguridad.php"); include ("../conexion.php"); if(empty($titulo)){die("No ha introducido ningún título.");} if(empty($autor)){die("No ha introducido el autor.");} if(empty($resumen)){die("No ha introducido el resumen.");} if(empty($texto)){die("No ha introducido el texto.");} if(empty($reseña)){die("No ha introducido la reseña.");} if(empty($categoria)){die("No ha introducido la categoría.");} if(empty($extras)){die("No ha introducido el extra.");} $fecha= date ("Y-n-d"); $exito = mysql_query("INSERT INTO articulos (texto,titulo,autor,reseña,fecha,resumen,categoria) VALUES ('$texto','$titulo','$autor','$reseña','$fecha','$resumen','$categoria')",$con); $id_articulo = mysql_insert_id(); $cuerpo = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'> <html> <head><link href='http://www.solowebmasters.net/estilo/estilo.css' rel='stylesheet' type='text/css'></head> <body bgcolor='#E0E2E0'> <div align='left'><a href='http://www.solowebmasters.net'><img src='http://www.solowebmasters.net/imagenes/boletin.jpg' width='400' height='85' border='0' align='top'></a> </div> <table width='100%' border='0' cellspacing='20'> <tr> <td colspan='3' align='left'></td> </tr> <tr> <td width='5%'> </td> <td width='90%'><div align='left'><font class='comentarios'>Nos ponemos en contacto contigo para avisarte de que existen novedades en Solowebmasters.net</font></div></td> <td width='5%'> </td> </tr> <tr> <td> </td> <td><a href='http://www.solowebmasters.net/index.php?sec=formacion&ssec=articulos&pagina=ver&id_articulo=$id_articulo' class='titulo'>$titulo</a><br> <em><font class='resumen'>$resumen</font></em><br><font class='bajoresumen'> ·: Por $autor - Publicado el $fecha</font><br> <img src='http://www.solowebmasters.net/imagenes/horizontal.gif' width='80%' height='1'></td> <td> </td> </tr> <tr> <td> </td> <td><font class='comentarios'>$extras</font></td> <td> </td> </tr> <tr> <td> </td> <td><font size='1'>Has recibido este email por ser suscriptor del Boletin de Solowebmasters.net<br> Si no es así entra aqui y te <a href='http://www.solowebmasters.net/index.php?sec=lista&pagina=out'>daremos de baja</a>.</font></td> <td> </td> </tr> </table> </body> </html>"; $sheader= "From: Boletín Solowebmasters.net <[email protected]>\r\n"; $sheader=$sheader."X-Mailer:PHP/".phpversion()."\n"; $sheader=$sheader."Mime-Version: 1.0\n"; $sheader=$sheader."Content-Type: text/html"; $asunto="Un nuevo artículo en Solowebmasters.net"; //subject $rs = mysql_query("SELECT * FROM listacorreo",$con); while($row = mysql_fetch_array($rs)) {$enviado= mail ($row['email'],$asunto,$cuerpo,$sheader);} if ($exito and $enviado) {echo 'Se ha introducido el artículo en la base de datos y se ha enviado el email a toda la lista';} else { echo 'Se ha producido algún error, por favor contacte con el webmaster.';} ?> |