########################################################### # Product: EZ FormMail # # Author: Sensation Designs # # Version: 1.0 # # Released: March 10, 2003 # # Website: http://www.sensationdesigns.com # # Copyright: Sensation Designs. All rights reserved. # ########################################################### ########################################################### # NOTE: # # # # All copyright information, credit, and links to any # # pages from Sensation Designs MAY NOT be modified, # # removied, or altered in any other fashhion. # ########################################################### ########################################################### # This program is free software; you can redistribute it # # and/ormodify it under the terms of the GNU General # # Public License as published by the Free Software # # Foundation; either version 2 of the License, or (at # # your option) any later version. # # # # This program is distributed in the hope that it will be # # useful, but WITHOUT ANY WARRANTY; without even the # # implied warranty of MERCHANTABILITY or FITNESS FOR A # # PARTICULAR PURPOSE. See the GNU General Public # # License for more details. # # # # You should have received a copy of the GNU General # # Public License along with this program; if not, write # # to the Free Software Foundation, Inc., 675 Mass Ave, # # Cambridge, MA 02139, USA. # ########################################################### ########################################################### # CONFIGURE THE FOLLOWING VARIABLES # ########################################################### // Recipient of message (This can be changed via the form itself) $recipient = 'bjsapp@uupmail.org'; // Subject of message (This can be changed via the form itself) $subject = 'BJs Application Request'; // This is a list of domains that can run EZ FormMail. Do not include // www, just the actual domain/ip address! $referers = array('uupinfo.org'); // This is the page that users will be redirected to after the form is // processed successfully. $success_url = 'http://www.uupinfo.org/benefits/thanks.html'; // Your site URL $siteurl = 'http://www.uupinfo.org'; ########################################################### # DO NOT EDIT BELOW THIS LINE # ########################################################### function Print_Footer() { echo '
Click here to go back';
Print_Footer();
die();
}
else {
if ($isrealname == 0) {
echo 'Error: Missing Field
';
echo 'No "realname" field found.
here to return to the home page.';
Print_Footer();
die();
}
elseif ($isrealemail == 0) {
echo 'Error: Missing Field
';
echo 'No "email" field found.
here to return to the home page.';
Print_Footer();
die();
}
}
if (!(preg_match("/^.{2,}?@.{2,}\./", $_POST['realemail']))) {
echo 'Error: Invalid E-mail
';
echo 'The e-mail address you entered ('.$_POST['realemail'].') is invalid.';
Print_Footer();
die();
}
$body = "Below is the result of your feedback form. It was submitted on:\n".date('l, F jS, Y').' at '.date('g:ia').".\n";
foreach ($_POST as $key => $val) {
if ($key == 'recipient') { $recipient = $val; }
elseif ($key == 'subject') { $subject = $val; }
else {
if ($key != 'realname' && $key != 'realemail') {
$body .= "\n".str_replace('req_', '', $key).": $val";
}
}
}
$body .= "\n\n-------- Submission Details --------\n";
$body .= "Remote Address: ".getenv('REMOTE_ADDR')."\n";
$body .= "HTTP User Agent: ".getenv('HTTP_USER_AGENT')."\n\n";
$body .= "--------------------------------------------------\n";
$body .= "Powered by EZ FormMail. Available at http://www.sensationdesigns.com!";
$mailheaders = "From: ".$_POST['realname']." <".$_POST['realemail'].">\n";
$mailheaders .= "Reply-To: ".$_POST['realemail'];
mail($recipient, $subject, $body, $mailheaders);
header("Location: $success_url");
}
else {
echo '