'$host' to your \$referrers array."); } //Start of the Mail Message $message = "This data was submitted via a web form at\n$HTTP_REFERER"; $message .= "\nDate: ".date("m/d/Y, h:i A")."\n----------------------------------------"; //Clean Up the GET method variables if(!empty($HTTP_GET_VARS)){ unset($get_data); while (list ($key,$value) = each ($HTTP_GET_VARS)) { if($key=='redirect' || $key=='to' || $key=='subject') {} else { $get_data[$key]=$value; } } } //Clean Up the POST method variables if(!empty($HTTP_POST_VARS)){ unset($post_data); while (list ($key,$value) = each ($HTTP_POST_VARS)) { if($key=='redirect' || $key=='to' || $key=='subject') {} else { $post_data[$key]=$value; } } } if($sort == 1) { @ksort($get_data); @ksort($post_data); } //Add GET data to the message if(!empty($get_data)){ while (list ($key,$value) = each ($get_data)) { $message .= "\n$delim$key:\n$value\n"; } } //Add POST data to the message if(!empty($post_data)){ while (list ($key,$value) = each ($post_data)) { $message .= "\n$delim$key:\n$value\n"; } } //End of the message $message .= "\n----------------------------------------\n"; $message .= "LedMailFrom by http://www.ledscripts.com"; // Strip PHP's slashes if(stripslashes($message) != $message) { $message = stripslashes($message); } //Check for an email field if(empty($email)) { $email = $adminmail; } //Check for a Subject Line if(empty($subject)) { $subject = "WWW Form Submission"; } //Check for a 'to' field if(empty($to)) { $to = $adminmail; } //Check for 'realname' field if(empty($realname)) { $realname = $to; } //Add name to $email $email .= " ($realname)"; //Send the E-mail mail($to, $subject, $message,"From: $email\nReply-To: $email"); //Redirect if(empty($redirect)){ return_text("Thank you for filling out the forum. You can return to the previous page right here."); } else { header("Location: $redirect"); } function return_text($text) { ?>
|
LedFromMail v1.0
|