amatuer Posted March 11, 2006 Share Posted March 11, 2006 Hi all, I'm using the feedback code below in which i get a whole heap of emails which dont make sense, sometimes their blank, mostly others have text in it. Somedays I might recieve a couple of hundred a day. Below if the php code. <?$SendTo = "emailaddress";$ThanksURL = "thankyou.htm"; //confirmation page$SubjectLine = "Oil Change Express Website Feedback";$name = $_POST['name'] ;$email = $_POST['email'] ;$telephone = $_POST['telephone'] ;$enquiry = $_POST['enquiry'] ;$http_referrer = getenv( "HTTP_REFERER" );$Divider = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";// Build Message Body from Web Form Input$MsgBody = @gethostbyaddr($_SERVER["REMOTE_ADDR"]) . "\n$Divider\n";$MsgBody = "This message was sent from:\n" . "$http_referrer\n" . "--------------------------------------------------\n\n" . "Name: $name\n" . "Email: $email\n" . "Telephone Number: $telephone\n" . "------------------------- ENQUIRY -------------------------\n\n" . $enquiry . "\n\n------------------------------------------------------------\n" ; mail($SendTo, $SubjectLine, $MsgBody, "From: \"$name\"emailaddress\r\nReply-To: \"$name\" <$email>\r\nX-Mailer: chfeedback.php 2.04" );header("Location: $ThanksURL");?> -------------------------------------------------------------------------------------These are some of the emails I receive. Quote Link to comment https://forums.phpfreaks.com/topic/4670-receiving-dodgy-emails/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.