I am using a modified version of the old formmail.pl script on my website to get information requests mailed to me. I have modified the script to NOT send email other than to two fixed (hardcoded) addresses (myself and our sales dept). I had to do this becvause spammers started to use my request pages as spam entry points.
Now the spammers have advanced and are filling the fields with html links in the hope that someone will click the links... So I want to expand the script to block sending altogether if the body contains forbidden words like 'href=' or 'http://'. But I have no clue as regards PERL programming so I would like to get some help in this. I have a form field called 'Feedback' that is loaded with the contents of a text box on my page. This text block is what I want to check for the forbidden words and either modify the subject of the outgoing email by adding something like '*** SPAM ***' to it or else not send the email at all if forbidden words are found. I think that the textbox contents can be retrieved by the following function: $CONFIG{'Feedback'} What I would like to do is to add a new function right before the mail send call inside the main procedure which could set an error if the feedback contains the forbidden words. The main procedure now looks like this: # Check Referring URL &check_url; # Retrieve Date &get_date; # Parse Form Contents &parse_form; # Check Required Fields &check_required; # Return HTML Page or Redirect User &return_html; # Send E-Mail &send_mail; I would like to have a checking procedure right in front of &send_mail, which will fail the script if the forbidden words are present. Any clues as to how to do this? Bo Berglund -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/