Ver Mensaje Individual
  #9 (permalink)  
Antiguo 24/05/2011, 12:29
grafica
 
Fecha de Ingreso: mayo-2011
Mensajes: 14
Antigüedad: 13 años
Puntos: 0
Respuesta: Error "Warning: mail() [function.mail]:"

Ok, leyendo la documentación, veo que yo había descargado phpmailer para php 5 pero en el .zip, no están incluídos los archivos class.phpmailer.php, ni class.smtp.php.

En el phpmailer para php 4 si estan. Los subí, y ahora volví al error del principio:

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 <[email protected]>... we do not relay <[email protected]> in E:\vhosts\golddreams.tv\httpdocs\formsphp\formnews 2.php on line 86

El código actual es el sig.:

Código:
<?php

    include("class.phpmailer.php");
    include("class.smtp.php");
     
    $mail = new PHPMailer();
    $mail->IsSMTP();
    $mail->SMTPAuth = true;
    $mail->SMTPSecure = "ssl";
    $mail->Host = "smtp.gmail.com";
    $mail->Port = 465;
    $mail->Username = "[email protected]";
    $mail->Password = "infogd2011";
import_request_variables("gP", "rvar_");

$error = 0;

//if (empty($rvar_NOME)) { $erro=1;}//

if (empty($rvar_Email)) { $error = 1; }

if (!strstr($rvar_Email,"@")) { $error = 1; }

if (!strstr($rvar_Email,".")) { $error = 1; }

if ($error == 0) {

        $mailbody .= "Enviado por: ".getenv("REMOTE_ADDR")."\n";

        $mailbody .= "Data: ".date("F j, Y, g:i a")."\n";

        $mailbody .= str_repeat("-", 80)."\n";

		//$mailbody .= "Nome       :: ".$rvar_NOME."\n";//

        $mailbody .= "E-mail     :: ".$rvar_Email."\n";

		$mailbody .= str_repeat("-", 80)."\n";
		
		$mailbody .= "Suscripción de Newsletters - site www.golddreams.tv\n";
		

@mail($rvar_To,$rvar_Subject,

        $mailbody,

            "From: \"".$rvar_Email."\" <".$rvar_Email.">\r\n"

           ."Reply-To: \"".$rvar_Email."\" <".$rvar_Email.">\r\n"

           ."X-Mailer: Administrador - Gold Dreams - PHP/".phpversion()."");
		   
    $page_title      = "Suscripción de Newsletters"; 

		$page_body_1   = "<br><br>Su suscripción fue enviada correctamente.<br>Recibirá un correo electronico que debe llenar para completar su suscripción.<br><br>Muchas gracias,<br><strong>GOLD DREAMS</strong>.\n";

    $page_button  =  "GOLD DREAMS";
	
$site = "[email protected]";

mail("$rvar_Email","Gracias por Visitarnos", 
"Hola,
Gracias por su interés en www.golddreams.tv 

Con el objetivo de no enviarle información que no sea de su interés, le pedimos que acceda al siguiente link http://www.mailfighter.net/gd/index.php?sid=58872&lang=es
Y elija que información desea recibir

Desde ya agradecemos por su tiempo.

Saluda atte.,
GOLD DREAMS
http://www.golddreams.tv","From: $site");

} else {

    $page_title      = "Suscripción   de Newsletters - error! ";

        $page_body_1   = "<br><br>Por favor, <strong>Llene correctamente</strong> todos los campos solicitados!<br>Muchas gracias.\n";

    $page_button  =  "GOLD DREAMS";
       
}

echo "<font color=\"#FFFFFF\" size=\"2\" face=\"Tahoma\"><strong>\n";



echo $page_title;



echo "</strong></font>\n"

        ."</td>\n"

        ."</tr>\n"

        ."<tr>\n"

        ."<td align=\"center\" valign=\"middle\">\n"

        ."<p><font color=\"#000000\" size=\"2\" face=\"Tahoma\">\n";



echo $page_body_1;

echo "</font>\n"

        ."</p>\n"

        ."</td>\n"

        ."</tr>\n"

        ."<tr>\n"

        ."<td height=\"45\" align=\"center\" bgcolor=\"#990000\">\n"
		
		."<font color=\"#FFFFFF\" size=\"2\" face=\"Tahoma\"><strong>\n";


echo $page_button;
?>
</html>