redgtsviper Posted February 25, 2006 Share Posted February 25, 2006 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 = "[email protected]"; $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 ); ?> Link to comment https://forums.phpfreaks.com/topic/3594-need-help-php-form-to-email-spam-problem/ Share on other sites More sharing options...
azuka Posted February 25, 2006 Share Posted February 25, 2006 [!--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) [snapback]349357[/snapback][/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] Link to comment https://forums.phpfreaks.com/topic/3594-need-help-php-form-to-email-spam-problem/#findComment-12459 Share on other sites More sharing options...
redgtsviper Posted February 26, 2006 Author Share Posted February 26, 2006 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 Link to comment https://forums.phpfreaks.com/topic/3594-need-help-php-form-to-email-spam-problem/#findComment-12486 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.