- mail: documentation ( source)
<?php
$confirmation_message = null;
if($_POST['action']="process_email")
{
$email = $_POST['email'];
$comment = $_POST['comment'];
$confirmation_message = "Thank you for your submission";
$message = "Somebody with the email ".$email." submitted their email to you.";
mail('jenny1truong@gmail.com', 'Web page submission', $message, 'From:obama@whitehouse.gov');
}
else{
$confirmation_message = "Erm...";
}
?>