Tema: Mail masivo
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/12/2006, 11:17
chispazo
 
Fecha de Ingreso: diciembre-2006
Mensajes: 26
Antigüedad: 17 años, 4 meses
Puntos: 0
Mail masivo

Hola estoy haciendo un mail masivo, con una lista de mail q' estoy llamando desde la base de datos:

<?
session_start();
include("enviaMaillist.php");
if ($boton=="enviar"){
//$logroCopiar=0;
//if ((!empty($asunto)) and (!empty($mensaje))){
enviaMaiList($con,$asunto,$mensaje);
}
?>
<?
$db_host=" "; //Host del mysql
$db_user=" "; //Usuario del mysql
$db_pass=" "; //Password del mysql
$db_database=" "; //db donde se creará la tabla users
$db_table="mail_list";

$con = mysql_connect($db_host, $db_user, $db_pass);
mysql_select_db($db_database, $con);
//$Query = "INSERT into $db_table values ('nombre' 'apellido', 'email', 'usuario', 'password')";


if ($borrar=="Borrar"){
$asunto="";
$mensaje="";
}
if ($boton=="Eliminar"){
$sql="DELETE FROM MAIL_LIST WHERE EMAIL='$email'";
mysql_query($sql,$con);
$email="";
}
?>
Este es el codigo de la pagina en donde muestro todos los mail de la lista y en donde tengo el formulario q' envia el mail...


Luego el codigo de la pagina incluida include("enviaMaillist.php"); es el sgte.:
<?php
/*******Conectamos y seleccionamos la base de datos ********/
$db_host="209.126.254.133"; //Host del mysql
$db_user="freakmm"; //Usuario del mysql
$db_pass="freakmm123"; //Password del mysql
$db_database="freakmm"; //db donde se creará la tabla users
$db_table="mail_list";

$con = mysql_connect($db_host, $db_user, $db_pass);
mysql_select_db($db_database, $con);

function enviaMaiList($con,$mensaje,$asunto){
$para = $resultado;
$asunto = $asunto;
$mensaje = $mensaje;
$cabeceras = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
/**$headers = "From: [email protected]\r\n" .
'X-Mailer: PHP/' . phpversion() . "\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: text/html; charset=utf-8\r\n" .
"Content-Transfer-Encoding: 8bit\r\n\r\n";**/

$sql="SELECT email FROM mail_list ";
$resultado=mysql_query($sql,$con);
while($row=mysql_fetch_array($resultado)){
//mail($row['EMAIL'],$asunto,$mensaje,"From: [email protected]");
mail($para, $asunto, $mensaje, $cabeceras);
echo $row['EMAIL']."<br>";
}
}
?>

Luego al mandarlo no funciona y sale el sgte. error:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache-AdvancedExtranetServer/1.3.33 Server at freakmm.cl Port 80


Haber si me podrian ayudar.. gracias...