Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/09/2009, 23:13
RAAM08
 
Fecha de Ingreso: mayo-2009
Ubicación: Stgo. Pinotepa Nacional Oaxaca
Mensajes: 34
Antigüedad: 15 años
Puntos: 0
Ayuda, Funcion mail no funciona!!!!!

HOLA A TODOS ESTOY REALIZANDO UN FORMULARIO DE CONTACTANOS PARA ENVIAR LOS DATOS QUE RELLENA EL USUARIO PERO NO ME FUNCIONA Y YA LE INTENTE DE VARIAS FORMAS Y NO SE CUAL ES MI ERROR... MI FUNCIÓN ENVIAR ES ESTA:
public function Enviar()
{
$dest = "correo_gmail";
$head = "From: ".$email."\r\n";
$head.= "To: correogmail\r\n";
// Ahora creamos el cuerpo del mensaje
$msg = "------------------------------- \n";
$msg.= " Comentarios \n";
$msg.= "------------------------------- \n";
$msg.= "NOMBRE: ".$nombre."\n";
$msg.= "DIRECCIÓN: ".$direccion."\n";
$msg.= "EMAIL: ".$email."\n";
$msg.= "TELÉFONO: ".$telefono."\n";
$msg.= "POBLACIÓN: ".$poblacion."\n";
$msg.= "ASUNTO: ".$asunto."\n";
$msg.= "HORA: ".date("h:i:s a ")."\n";
$msg.= "FECHA: ".date("D, d M Y")."\n";
$msg.= "IP: ".$REMOTE_ADDR."\n";
$msg.= "------------------------------- \n\n";
$msg.= $comentarios."\n\n";
$msg.= "------------------------------- \n";
$msg.= " Mensaje creado por blog.unijimpe.net \n";
// Finalmente enviamos el mensaje
if (mail($dest, "Comentarios", $msg, $head))
{
$aviso = "Su mensaje fue enviado.";
}
else
{
$aviso = "Error de envío.";
}
}


Y ME MANDA EL SIGUIENTE ERROR:

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Archivos de programa\Apache Software Foundation\Apache2.2\htdocs\miweb\paq\Contact.php on line 56

Y PUES LA LÍNEA 56 ES LA SIGUIENTE:

Código a:
Ver original
  1. if (mail($dest, "Comentarios", $msg, $head))
Y YA REVISE MI ARCHIVO php.ini en mail y lo tengo de la siguiente forma:

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
sendmail_from = correogmail


Cuál es el error que no lo entiendo!!!!!!!!