FormMail snag cgi
FormMail snag cgi
@recipients - A list of Perl regular expression patterns that
determine who the script will allow mail to be sent
to in addition to those set in @allow_mail_to. This is
present only for compatibility with the original
formmail script. We strongly advise against having
anything in @recipients as it's easy to make a mistake
with the regular expression syntax and turn your
formmail into an open SPAM relay.
There is an implicit $ at the end of the regular
expression, but you need to include the ^ if you want
it anchored at the start. Note also that since '.' is
a regular expression metacharacter, you'll need to
escape it before using it in domain names.
If that last paragraph makes no sense to you then
please don't put anything in @recipients, stick to
using the less error prone @allow_mail_to.
%recipient_alias - A hash for predefining a list of recipients in the
script, and then choosing between them using the
recipient form field, while keeping all the email
addresses out of the HTML so that they don't get
collected by address harvesters and sent junk email.
For example, suppose you have three forms on your
site, and you want each to submit to a different email
address and you want to keep the addresses hidden.
You might set up %recipient_alias like this:
%recipient_alias = (
'1' => 'firstname.lastname@example.org',
'2' => 'email@example.com',
'3' => 'firstname.lastname@example.org',
In the HTML form that should submit to the recipient
'email@example.com', you would then set the recipient
<input type="hidden" name="recipient" value="2" />
The recipients in %recipient_alias are automatically added
to the allowed recipients list, so there's no need to list
them all in @allow_mail_.
here's the code in FormMail.cgi that used. when i click submit it says internal error.
@referers = ('scriptarchive.com','ottawa.ca');
# @recipients defines the e-mail addresses or domain names that e-mail can #
# be sent to. This must be filled in correctly to prevent SPAM and allow #
# valid addresses to receive e-mail. Read the documentation to find out how #
# this variable works!!! It is EXTREMELY IMPORTANT. #
@recipients = ('^webmaster\@ottawa.ca');
# %recipient_alias = (
# '1' => 'firstname.lastname@example.org',#
#'2' => 'email@example.com',#
#'3' => 'firstname.lastname@example.org',#