Copia estos codigos como estan aqui primero pruebalos como estan:
Formulario de contacto form.html
Código HTML:
<html>
<head>
<meta http-equiv="Content-Language" content="es">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Formulario de Contacto</title>
</head>
<body>
<table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
<form method="POST" action="enviar.php">
<tr>
<td width="100">Nombres :</td>
<td><input type="text" name="nombres" size="20"></td>
</tr>
<tr>
<td width="100">E-mail :</td>
<td><input type="text" name="email" size="20"></td>
</tr>
<tr>
<td width="100">Empresa :</td>
<td><input type="text" name="empresa" size="20"></td>
</tr>
<tr>
<td width="100">Mensaje :</td>
<td> </td>
</tr>
<tr>
<td width="100"> </td>
<td>
<p><textarea rows="2" name="msg" cols="20"></textarea></p>
<p><input type="reset" value="Restablecer" name="B4">
<input type="submit" value="Enviar" name="B3"></td>
</tr>
</form>
</table>
</body>
</html>
enviar.php
Código PHP:
<?php
$mail='[email protected]';
$nombres = $_POST['nombres'];
$email = $_POST['email'];
$empresa = $_POST['empresa'];
$msg = $_POST['msg'];
$thank="index.html";
$message = "
nombres:".$nombres."
email:".$email."
empresa:".$empresa."
msg:".$msg."";
if (mail($mail,"consulta",$message))
Header ("Location: $thank");
?>
tiene que funcionarte a mi me funciona a la perfección