It is my opinion that server side form handling is the easiest and safest to implement. Some users like to browse without javascript turned on for some reason. This is a pretty simple form, no validation, but it asks for a name, email, and a short message. The action is set to the path of a mail.php file. In the mail.php file you'll see that it gets the values of the form based on the names assigned to the inputs, then emails them to you, and returns the user to some page.
Code:
your form
<form action="mail.php" method="post">
<label for="name">name:</label> <input type="text" id="name" name="name"><br>
<label for="email">email:</label> <input type="text" id="email" name="email"><br>
<label for="message">message:</label> <textarea name="message" id="message"></textarea><br>
<input type="submit" value="send">
</form>
Code:
for a script called mail.php
<?php
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$message = $_REQUEST['message'];
$body = "
$name
$email
$message";
mail("youremail@address.com", "Email subject", $body, "From: $email"); header("Location: http://www.whereyouwanttheirbrowsertogo.com/thanks.html");
?>