![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
Este es el code que uso:
Código PHP:
<?
function sendMail($mail,$subject,$body){
$headers = "From: $mail\n";
mail("[email protected]",$subject,$body,$headers);
}
if (isset($_POST["btn_enviar"])){
$nombre=$_POST["nombre"];
$mail=$_POST["mail"];
$direccion=$_POST["direccion"];
$ciudad=$_POST["ciudad"];
$telefono=$_POST["telefono"];
$asunto=$_POST["asunto"];
$mensaje=$_POST["mensaje"];
$body = "Nombre..: ".$nombre." \n\n E-mail..: ".$mail." \n\n Direccion..: ".$direccion." \n\n Ciudad..: ".$ciudad." \n\n Telefono..: ".$telefono." \n\n Consulta..: ".$mensaje;
sendMail($nombre,$asunto,$body);
}else{}
?>
Los correos no me llegan y cuando los mando me sale este error.:
() [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:\Inetpub\wwwroot\clientes\www.pagina.cl\contacto_directora.php on line 19
...que puede ser
![Neurótico](http://static.forosdelweb.com/fdwtheme/images/smilies/scared.png)
Saludos