<?php
$email = 'teste@mailinator.com';
$redirect = 'http://www.sapo.pt/';
if(isset($_POST['submit'])){
$s = '';
foreach($_POST as $key => $val)
$s .= filter_var($key . ': ' . $val, FILTER_SANITIZE_STRING) . "\n";
$headers = 'From: ' . $email . "\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();
mail($email, 'Contato Site', $s, $headers);
header('Location: ' . $redirect);
}
?>
<html>
<head>
</head>
<body onLoad="window.history.go(-1);">
</body>
</html>
Muito básico, sem verificações nenhumas.