Hi guys,
I have a contact form on my website which appears to be being used by email spammers - at one point my website was taken down by my hosts as my account was suspended as I was apparently sending a lot more than the allowed 150 emails an hour.
The reason I suspect it's my web form is that I receive a lot of spam supposedly sent through the actual web form so I'm sure it's the culprit.
The problem is, I can't see what I can do differently to my web form to stop this from happening. It's a very straight forward form that uses the mail function to send an email should anyone fill out the form.
Not sure it matters but I've added the main crux of the code below:
$Submit=$_POST['Submit'];
if (isset($Submit))
{
//the function escapeshellarg helps prevents users from entering malicous code into the form.
$name = $_POST['name'];
$name = escapeshellarg($name);
$emailadd = $_POST['email'];
$emailadd = escapeshellarg($emailadd);
$comments = $_POST['comments'];
$comments = escapeshellarg($comments);
$email = "$name\n\nWho can be contacted by emailing\n$emailadd\n\nSaid:\n\n$comments";
echo("<br><br>Thank you for filling in our contact form $name.<br><br> Your comments<br><br> <i>'$comments'</i><br><br> will be read and an appropriate response sent shortly.<br><br><hr><br>");
$headers = 'From: ' . $name . "\r\nReply-To:" . $emailadd;
mail("richard@allaboutthegames.net", "AATG - Contact Form", $email, $headers);
};
Any suggestions?