estoy haciendo un formulario de contacto ,tengo el formulario html y el archivo php por separado.
el codigo php es el sgt:
Código PHP:
<?php
$nombre = $_POST['nombre'];
$email = $_POST['email'];
$mensaje = $_POST['mensaje'];
$para = '[email protected]';
$titulo = 'ASUNTO DEL MENSAJE';
$header = 'From: '. $email;
$msjCorreo = "Nombre: $nombre \n Email: $email \n Mensaje:$mensaje \n ";
if($_POST['submit']){
if(mail($para,$titulo,$msjCorreo,$header)){
echo"<script languaje='javascript'>
alert('Mensaje enviado');
windows.location.href='home.php';
</script>";
}else {
echo 'fallo el envio';
}
}
?>
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:\AppServ\www\www\nweb\contacto.php on line 10
fallo el envio
verifique el php.ini y esta configurado en el puerto 25, no se que mas podra ser.
ojala me puedan ayudar.
gracias