Tema: Mail masivo
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 21/01/2008, 11:25
Avatar de j_aroche
j_aroche
Server Ninja
 
Fecha de Ingreso: agosto-2006
Ubicación: iPhone: 14.624481,-90.487457
Mensajes: 2.066
Antigüedad: 18 años, 6 meses
Puntos: 223
Re: Mail masivo

Me parece que te hace falta un while para seguir avanzando en los resultados del query:

Código PHP:
    $con mysql_query("SELECT * FROM usuarios") or die("Error: ".mysql_error());
    while( 
$mostrar mysql_fetch_array($con) ) { 
          
$cuerpo $HTTP_POST_VARS["mensaje"];
          
mail("$mostrar[email], ",'$HTTP_POST_VARS["mensaje"]',$cuerpo);
    }
    echo 
'<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="150"><img src="imagenes/ok.jpg"></td>
    <td width="*">Mensaje masivo enviado. <a href="admin.php">Volver</a></td>
  </tr>
</table>'
;
    } 
__________________
Blog: JavierAroche.com - Twitter: @j_aroche