Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/02/2005, 12:22
Avatar de The_omars
The_omars
 
Fecha de Ingreso: marzo-2004
Mensajes: 271
Antigüedad: 20 años, 1 mes
Puntos: 0
error al mandar mail en SMPT

hola foro tengo un error al momonto que mando un mail pero no se de que sea si de el SMPT o del codigo

el error es:


SMTP Error: From address [Object] failed

este es el codigo

Código PHP:

<?
require('./includes/class_phpmailer_php.php');
require(
'./includes/class_smtp_php.php');

$nombre=$_POST['Nombre'];
$telefono=$_POST['Telefono'];
$fax=$_POST['Fax'];
$mail=$_POST['mail'];
$cate=$_POST['categoria'];
$comentarios=$_POST['Comentarios'];


    
$msg="[email protected]";
      
$mail = new PHPMailer();
    
$mail->PluginDir "includes/";
    
$mail->Mailer "smtp";
    
$mail->Host "localhost";
    
$mail->SMTPAuth false;
    
$mail->From $mail;
    
$mail->FromName $nombre;
    
$mail->Timeout=45;
    
$mail->AddAddress($msg);
    
$mail->Subject "information";
    
$mail->Body " Nombre: ".$nombre."<br> E mail: ".$mail."<br> Teléfono: ".$telefono."<br>".$categoria."<br><br> Comentarios: ".$comentarios;
    
$mail->AltBody " Formulario";
    
$exito $mail->Send();
    
$intentos=1
    while ((!
$exito) && ($intentos 5))                 
    {
             
sleep(5);
        
$exito $mail->Send();
         
$intentos=$intentos+1;    
    }
    if(!
$exito)
    {
     echo 
"Problemas enviando correo electrónico a ".$msg;
     echo 
"<br/>".$mail->ErrorInfo;    
    }
    else
    {
      echo 
"<script language='javascript'>";
      echo 
"document.location.href='planes.htm';"//redirecciono
      
echo "</script>";
      break;
     }
?>