Por fin he logrado accesar a la pagina, ahora el problema cuando trato de enviar los correos, me envia 2 errores:
Warning: mail(): SMTP server response: 550 5.1.1 <> User unknown; rejecting in home/www/hentai_nation/boletin/enviar.php on line 41
Warning: Cannot modify header information - headers already sent by (output started at home/www/hentai_nation/boletin/enviar.php:41) in home/www/hentai_nation/boletin/enviar.php on line 63
La linea 41 es:
mail($_CONF['email'],$_POST['titulo'],$msg,$headers);
Y la 63 es:
Header("Location: $HTTP_REFERER");
El codigo es este:
<?php
//===>
// Sistema de Envio de boletines mediante SQL
// Creado por: Omar G. Soto (OmarPR)
// Derechos Reservados 2004-04©
//===>
# Incluimos el archivo de configuración
include('config.php');
# Conectamos a la database mySQL.
$mysql = mysql_connect($_CONF['sqlhost'],$_CONF['sqluser'],$_CONF['sqlpass']);
mysql_select_db($_CONF['sqldb'],$mysql);
if((isset($_POST['contenido'])) && (isset($_POST['titulo']))) {
# Con este pequeno bucle sacamos todos los email de los miembros.
$resp = mysql_query("SELECT * FROM ".$_CONF['tabla']);
$nums = mysql_num_rows($resp);
while($u=mysql_fetch_array($resp)) {
$inc++;
if($inc == $nums) { $semail .= $u['correo']; }
else { $semail .= $u['correo'].", "; }
}
# Seteamos los headers
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$_CONF['email']."\r\n";
$headers .= "Bcc: ".$semail."\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: Just My Server";
# Le aplicamos al mensaje el theme.
$msg = template($_POST['titulo'],$_POST['contenido']);
# Enviamos el email.
mail($_CONF['email'],$_POST['titulo'],$msg,$headers);
}
# Función para enviar el boletin junto al template.
function template ($titulo,$contenido) {
global $_CONF;
$dir = "./temas/".$_CONF['theme'];
$diseno = fopen($dir,"r");
$valores = array(
"{contenido}" => nl2br($contenido),
"{titulo}" => $titulo,
"{email}" => $_CONF['email']
);
$cont = fread($diseno,filesize($dir));
foreach ($valores as $i=>$a) $cont = str_replace($i,$a,$cont);
fclose ($diseno);
return $cont;
}
Header("Location: $HTTP_REFERER");
?>
Espero me puedan ayudar
Desde ya, muchas gracias.