Foros del Web » Programando para Internet » PHP »

Mandar mail

Estas en el tema de Mandar mail en el foro de PHP en Foros del Web. HOLA A TODOS!!!! SOY NUEVO EN php Y TENGO UN PROBLEMA (QUE DEBE SER ALGO OBVIO)... AL UTILIZAR LA FUNCIÓN mail() ME DICE Q NO ...
  #1 (permalink)  
Antiguo 16/09/2008, 13:24
 
Fecha de Ingreso: septiembre-2008
Mensajes: 4
Antigüedad: 15 años, 7 meses
Puntos: 0
Mandar mail

HOLA A TODOS!!!!

SOY NUEVO EN php Y TENGO UN PROBLEMA (QUE DEBE SER ALGO OBVIO)... AL UTILIZAR LA FUNCIÓN mail() ME DICE Q NO CONOCE EL RECIPIENTE DEL MENSAJE Y A SU VEZ NO ME LLEGA EL MENSAJE A MI CASILLA DE CORREO... ESTE ES EL CODIGO:
<?php
$para = '[email protected]';
$asunto = 'el asunto';
$mensaje = 'hola';
$cabeceras = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($para, $asunto, $mensaje, $cabeceras);
?>

DESDE YA MUCHAS GRACIAS

SALUDOS

SEBA
  #2 (permalink)  
Antiguo 16/09/2008, 13:28
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 10 meses
Puntos: 2135
Respuesta: Mandar mail

Tema trasladado a PHP General.

Si te dice que no reconoce el recipiente, es porque seguramente el recipiente es incorrecto.

Saludos.
  #3 (permalink)  
Antiguo 16/09/2008, 15:17
 
Fecha de Ingreso: septiembre-2008
Mensajes: 4
Antigüedad: 15 años, 7 meses
Puntos: 0
Respuesta: Mandar mail

Gracias x responder...

El recipiente es mi casilla d correo en gmail

q otra cosa puede ser?????
El codigo esta bien o hice cualquier cosa????
  #4 (permalink)  
Antiguo 16/09/2008, 16:26
Avatar de radarcba  
Fecha de Ingreso: mayo-2005
Ubicación: ureleando
Mensajes: 505
Antigüedad: 18 años, 11 meses
Puntos: 3
Respuesta: Mandar mail

Pega el error asi lo podemos ver ;).

Estás probando online o en un servidor local?
__________________
Maldición va a ser un día hermoso... PR
Tetris, correo & TU IP
  #5 (permalink)  
Antiguo 16/09/2008, 16:33
 
Fecha de Ingreso: julio-2008
Ubicación: Pontevedra
Mensajes: 23
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: Mandar mail

Depende del php que sea te funciona el mail() o no ami por ejemplo me va en local en php 4 y en php5 ya no va. Por lo menos ami no me fue.
  #6 (permalink)  
Antiguo 16/09/2008, 18:22
 
Fecha de Ingreso: septiembre-2008
Mensajes: 4
Antigüedad: 15 años, 7 meses
Puntos: 0
Respuesta: Mandar mail

lo pruebo en www.encontraloaqui.com/contact_form.php y el error me lo pone asi:

Warning: mail() [function.mail]: SMTP server response: 550 <[email protected]>, Recipient unknown in C:\Comunicaciones\AppServ\www\encontraloaqui\email 2.php on line 17

LES CUENTO Q LA LINEA 17 es: mail($para, $asunto, $mensaje, $cabeceras);
  #7 (permalink)  
Antiguo 16/09/2008, 18:25
 
Fecha de Ingreso: septiembre-2008
Mensajes: 4
Antigüedad: 15 años, 7 meses
Puntos: 0
Respuesta: Mandar mail

AHORA BUSQUE OTROS CODIGOS XO SIGO EN LA MISMA... SI MIRAN EN EL URL ENCONTRARAN UN NUEVO ERROR:

Warning: mail() [function.mail]: SMTP server response: 550 <[email protected]>, Recipient unknown in C:\Comunicaciones\AppServ\www\encontraloaqui\email 3.php on line 18

DONDE email3.php TIENE COMO CODIGO:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<?php
$sfrom=$mail; //cuenta que envia
$sdestinatario="[email protected]"; //cuenta destino
$ssubject="asunto"; //subject
$shtml="nombre"; //mensaje
$sheader="From:".$sfrom."\nReply-To:".$sfrom."\n";
$sheader=$sheader."X-Mailer:PHP/".phpversion()."\n";
$sheader=$sheader."Mime-Version: 1.0\n";
$sheader=$sheader."Content-Type: text/html";
mail($sdestinatario,$ssubject,$shtml,$sheader);
?>
</body>
</html>

Y contact_form.php TIENE COMO CODIGO:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<form method="post" action="email3.php">
Nombre: <input type="text" name="nombre" /><br />
Mail: <input type="text" name="mail" /><br />
<input type="submit" name="Enviar" />
</form>
</body>
</html>

DE VERDAD LES AGRADEZCO LA AYUDA XQ MI SABIDURIA ACERCA DE php ES NULA Y ESTOY TRATANDO D SER AUTODIDACTA

SALUDOS

SEBA
  #8 (permalink)  
Antiguo 16/09/2008, 19:11
Avatar de radarcba  
Fecha de Ingreso: mayo-2005
Ubicación: ureleando
Mensajes: 505
Antigüedad: 18 años, 11 meses
Puntos: 3
Respuesta: Mandar mail

segun veo estas utilizando un servidor local AppServ, revisa la configuracion de SMTP de AppServ o proba el codigo online.
__________________
Maldición va a ser un día hermoso... PR
Tetris, correo & TU IP
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.
Respuesta




La zona horaria es GMT -6. Ahora son las 14:42.