<?
$adminaddress = "[email protected]";
$siteaddress ="www.anydomain.com";
$sitename = "[YourName]";
//No need to change anything below ...
// Gets the date and time from your server
$date = date("m/d/Y H:i:s");
// Gets the IP Address
if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);
// Gets the POST Headers - the Flash variables
$action = $HTTP_POST_VARS['action'] ;
$email = $HTTP_POST_VARS['email'] ;
$firstname = $HTTP_POST_VARS['firstname'] ;
$name = $HTTP_POST_VARS['name'] ;
$company = $HTTP_POST_VARS['company'] ;
$city = $HTTP_POST_VARS['city'] ;
$comments = $HTTP_POST_VARS['comments'] ;
putenv ("QMAILUSER=yourname");
putenv ("[email protected]");
putenv ("QMAILHOST=anydomain.com");
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain;charset=us-ascii\r\n";
$headers .= "From: yourname<[email protected]>";
// Process the form data!
// and send the information collected in the Flash form to Your nominated email address
if ($action == "send") {
//
mail ("$adminaddress","Info Request",
"A visitor at YourName has left the following information\n
Firstname: $firstname
Name: $name
Company: $company
City: $city
Email: $email\n
The visitor commented:
------------------------------
$comments
------------------------------
Date/Time: $date") ;
//This sends a confirmation to your visitor
mail ("$email","Thank You for visiting YourName",
"Hello $firstname $name,\n
We have received your inquiry and will reply shortly. Thank you for your interest in YourName.\n
Sincerely,
YourName" );
//Confirmation is sent back to the Flash form that the process is complete
$sendresult = "Thank you. You will receive a confirmation email shortly.";
$send_answer = "answer=";
$send_answer .= rawurlencode($sendresult);
echo $send_answer;
} //
?>