Jump to content


Photo

NEED HELP! PHP FORM to EMAIL SPAM PROBLEM


  • Please log in to reply
2 replies to this topic

#1 redgtsviper

redgtsviper
  • Members
  • PipPip
  • Member
  • 19 posts

Posted 25 February 2006 - 07:18 PM

I am using the following code to send form content to my email address. I am having problems with spam. What can I do to fix this problem. Any code would be very helpful. I am new to PHP

<?php

$msg = "My Website Online Contact Submission\n";

$msg .= "Name: $name\n";
$msg .= "Comments: $emailAddress\n\n";
$msg .= "Comments: $phone\n\n";
$msg .= "Comments: $message\n\n";





$to = "me@mydomain.com";
$subject = "CONTACT FROM WEBSITE";
$mailheaders = "From: Website Submission Form <$emailAddress>\n";
$mailheaders .= "Reply-To:$Email_Address <$emailAddress>\n\n";
// Mail to address
mail ( $to, $subject, $msg, $mailheaders );

?>

#2 azuka

azuka
  • Members
  • PipPipPip
  • Advanced Member
  • 55 posts
  • LocationNigeria

Posted 25 February 2006 - 08:39 PM

[!--quoteo(post=349357:date=Feb 25 2006, 08:18 PM:name=Charles Andrews)--][div class=\'quotetop\']QUOTE(Charles Andrews @ Feb 25 2006, 08:18 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
I am using the following code to send form content to my email address. I am having problems with spam. What can I do to fix this problem. Any code would be very helpful. I am new to PHP

<?php

$msg = "My Website Online Contact Submission\n";

$msg .= "Name: $name\n";
$msg .= "Comments: $emailAddress\n\n";
$msg .= "Comments: $phone\n\n";
$msg .= "Comments: $message\n\n";


$to = "";
$subject = "CAMP REGISTRATION FROM DALLASBAT.COM";
$mailheaders = "From: Website Submission Form <$emailAddress>\n";
$mailheaders .= "Reply-To:$Email_Address <$emailAddress>\n\n";
// Mail to address
mail ( $to, $subject, $msg, $mailheaders );

?>
[/quote]

You should include image verification with your form. It sure helps. [a href=\"http://www.php-mysql-tutorial.com/user-authentication/image-verification.php\" target=\"_blank\"]Check out this tutorial[/a]

Given enough eyeballs all bugs are shallow. My Website

#3 redgtsviper

redgtsviper
  • Members
  • PipPip
  • Member
  • 19 posts

Posted 26 February 2006 - 12:09 AM

I would like to keep it really simple. I prefer not to use the image verification method. Any other ideas on a better method of fixing my current code




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users