Foros del Web » Programando para Internet » PHP »

Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address in

Estas en el tema de Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address in en el foro de PHP en Foros del Web. Buen dia a todos Estoy tratrando de enviar un correo desde mi pagina pero me da este erro Warning: mail() [function.mail]: SMTP server response: 501 ...
  #1 (permalink)  
Antiguo 21/02/2008, 17:59
Avatar de viqtor  
Fecha de Ingreso: noviembre-2007
Ubicación: Donde estoy?
Mensajes: 49
Antigüedad: 16 años, 5 meses
Puntos: 0
Exclamación Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address in

Buen dia a todos
Estoy tratrando de enviar un correo desde mi pagina pero me da este erro

Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address in


Código PHP:
$destinatario "[email protected]";  
$asunto "Este mensaje es de prueba de la pagina de summaco.com";  
$cuerpo '  
<html>  
<head>  
   <title>Prueba de correo de summaco.com</title>  
</head>  
<body>  
<h1>Hola amigos!</h1>  
<p>  
<b>prueba del correo electronico de la pagina de www.summaco.com</b>. 
</p>  
</body>  
</html>  
'
;  

//para el envío en formato HTML  
$headers "MIME-Version: 1.0\r\n";  
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";  

//dirección del remitente  
$headers .= "From: victor hugo Ramirez [email protected]\r\n";  

//dirección de respuesta, si queremos que sea distinta que la del remitente  
$headers .= "Reply-To: [email protected]\r\n";  

//ruta del mensaje desde origen a destino  
$headers .= "Return-path: [email protected]\r\n";  

//direcciones que recibián copia  
$headers .= "Cc: [email protected]\r\n";  

//direcciones que recibirán copia oculta  
$headers .= "Bcc: [email protected]\r\n";  

mail($destinatario,$asunto,$cuerpo,$headers); 

la configuracion del php.ini
[mail function]
; For Win32 only.
SMTP = 138.243.1.5
smtp_port = 25

Mi php esta en iis, el serv de correo es con exchange

NOSE QUE PUEDA HACER NESESITO AYUDA

GRACIAS DE ANTEMANO
  #2 (permalink)  
Antiguo 21/02/2008, 18:08
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address

Tu header debe de ser así:
Código PHP:
$headers .= "From: victor hugo Ramirez <[email protected]>\r\n"
Saludos.

Última edición por GatorV; 15/06/2012 a las 10:36
  #3 (permalink)  
Antiguo 21/02/2008, 19:25
Avatar de viqtor  
Fecha de Ingreso: noviembre-2007
Ubicación: Donde estoy?
Mensajes: 49
Antigüedad: 16 años, 5 meses
Puntos: 0
Re: Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address

MUCHAS GRACiAS DEJAME PROBARLO MAÑANA QUE LLEGUE A LA OFICINA Y MUCHAS GRACIAS
  #4 (permalink)  
Antiguo 22/02/2008, 08:46
Avatar de viqtor  
Fecha de Ingreso: noviembre-2007
Ubicación: Donde estoy?
Mensajes: 49
Antigüedad: 16 años, 5 meses
Puntos: 0
Re: Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address

Buenos Dias Gatorv

Ya Hice Lo Que Me Mencionaste Y Me Sigue Marcando El Mismo Error Tienes Idea De Lo Que Pueda Ser. Por Que Tambien Probe Creando Un Servidor Virtual De Smtp Con El Iis.
Y Tambien Me Da El Error Sabes Cual Es La Sintaxis Correecta
Muchas Gracias De Antemano
  #5 (permalink)  
Antiguo 22/02/2008, 08:59
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address

Trata entonces así:
Código PHP:
$headers .= "From: [email protected]\r\n"
Parece ser que tu server SMTP no soporta alias en las direcciones de email.

Saludos.
  #6 (permalink)  
Antiguo 22/02/2008, 10:58
Avatar de viqtor  
Fecha de Ingreso: noviembre-2007
Ubicación: Donde estoy?
Mensajes: 49
Antigüedad: 16 años, 5 meses
Puntos: 0
Re: Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address

Muchas Gracias Gatorv
Ya Funciono Si Era Eso Pero Para Poderle Mandar A Dos Destinatarios Como Seria La Sintaxys?
  #7 (permalink)  
Antiguo 22/02/2008, 11:51
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address

Usa 2 veces la función mail(), una por destinatario:
Código PHP:
mail($destinatario1,$asunto,$cuerpo,$headers);
mail($destinatario2,$asunto,$cuerpo,$headers); 
Saludos.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Tema Cerrado

SíEste tema le ha gustado a 2 personas (incluyéndote)




La zona horaria es GMT -6. Ahora son las 00:07.