Prueba asi:
Código PHP:
Ver original<?php
if(isset($_POST['email'])) {
$email_subject = $_POST['asunto'];
$email_message = "Detalles del formulario de contacto: \n\n";
$email_message .= "Nombre: " . $_POST['nombre'] . "\n";
$email_message .= "Apellido(s): " . $_POST['apellidos'] . "\n";
$email_message .= "Teléfono: " . $_POST['telefono'] . "\n";
$email_message .= "E-mail: " . $_POST['email'] . "\n";
$email_message .= "Asunto: " . $_POST['asunto'] . "\n";
$email_message .= "Comentarios: " . $_POST['comentario'] . "\n\n";
$headers = "From: " .$email_from."\r\n".
'Reply-To: ' .$email_from."\r\n" .
@mail($email_to, $email_subject, $email_message, $headers);
echo "¡El formulario se ha enviado con éxito!";
}
header('location: index.php'); ?>