Jump to content

Archived

This topic is now archived and is closed to further replies.

amatuer

receiving dodgy emails

Recommended Posts

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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.