Ver Mensaje Individual
  #11 (permalink)  
Antiguo 01/02/2015, 17:31
mblascog
 
Fecha de Ingreso: enero-2002
Ubicación: Sabadell
Mensajes: 565
Antigüedad: 22 años, 4 meses
Puntos: 4
Respuesta: Error con PHPMailer

Buenas,
Sigo liada con lo mismo.
Finalmente he retrocido de versión y sigo con class.phpmailer.php
He avanzado un poco, pero me surge un error, busco la solución pero no la entiendo.

El error es el siguiente:
Código Error:
Ver original
  1. SMTP -> FROM SERVER:220 smtp-03.servidoresdns.net ESMTP Postfix
  2. SMTP -> FROM SERVER: 250-llsa736-a03.servidoresdns.net 250-PIPELINING 250-SIZE 51200000 250-ETRN 250-STARTTLS 250-AUTH PLAIN DIGEST-MD5 CRAM-MD5 LOGIN 250-AUTH=PLAIN DIGEST-MD5 CRAM-MD5 LOGIN 250-ENHANCEDSTATUSCODES 250 8BITMIME
  3. SMTP -> FROM SERVER:250 2.1.0 Ok
  4. SMTP -> FROM SERVER:553 5.7.1 : Sender address rejected: not owned by user [email protected]
  5. SMTP -> ERROR: RCPT not accepted from server: 553 5.7.1 : Sender address rejected: not owned by user [email protected]
  6. SMTP Error: The following recipients failed: [email protected]

He buscado el error 553 5.7.1 y dice lo siguiente:
Código Descripción:
Ver original
  1. 553 5.7.1 Sender address rejected: not owned by user [email protected]
  2. This is the error message that is received when you are trying to send an email as a different user. This error message is seen by the users who are using Exchange servers with our system.
  3.  
  4. You need to add an identity for the same in the webmail. For example,
  5.  
  6. Log into the webmail of [email protected]
  7. Add the identity from the settings tab for [email protected] (If the from address is [email protected]). For more information, please refer: http://support.mailhostbox.com/email-users-guide/sender-identities
  8. Once the identity is added and confirmed, you should be able to send the emails.

Parece com si el username y el from fuesen diferentes, y no lo son. Por lo que no entiendo que sugiera crear una identidad/alias para poder enviar

Y el código PHP:
Código PHP:
Ver original
  1. require "class/class.phpmailer.php";
  2.     $mailPrto = new PHPMailer(); //defaults to using php "mail()"; the true param means it will throw exceptions on errors, which we need to catch
  3.     try {
  4.         $mailPrto->IsSMTP();
  5.         $mailPrto->SMTPAuth = true;
  6.         $mailPrto->SMTPDebug = 2;
  7.         $mailPrto->Host = 'smtp.dominio.es';
  8.         $mailPrto->Port = 25;
  9.         $mailPrto->Username = "[email protected]";
  10.         $mailPrto->Password = "contraseña";
  11.         $mailPrto->From = "[email protected]";
  12.         $mailPrto->AddReplyTo = $cor_;
  13.         $mailPrto->FromName = $nom_;
  14.         $mailPrto->AddAddress(Correo, 'Cliente'); //para
  15.         $mailPrto->SetFrom($cor_, 'Mensage web'); //de
  16.         $mailPrto->CharSet = 'UTF-8';
  17.         $mailPrto->Subject = "Sol·licitud";
  18.         $mailPrto->AltBody = 'bla bla bla'; // texto alternativo
  19.         $mailPrto->IsHTML(true);      
  20.         $mailPrto->MsgHTML($message);
  21.         $mailPrto->Send();
  22.         echo '<p>Mensaje enviado correctamente'</p>';
  23.     } catch (phpmailerException $e) {
  24.     echo $strMsgFrmErr[$idioma].' '.$e->errorMessage(); //Pretty error messages from PHPMailer
  25.     } catch (Exception $e) {
  26.     echo $strMsgFrmErr[$idioma].' '.$e->getMessage(); //Boring error messages from anything else!
  27.     }

Alguien puede ayudarme? Gracias
__________________
Qué fácil cuando lo sabes y qué difícil cuando no

Última edición por mblascog; 02/02/2015 a las 01:33