Web Analytics Made Easy -
StatCounter cgi script confused about @recipients - CodingForum


No announcement yet.

cgi script confused about @recipients

  • Filter
  • Time
  • Show
Clear All
new posts

  • cgi script confused about @recipients

    here's the code i'm using. but i want to hide the email address on my html and use name=recipient value="1" that would be for [email protected]
    @referers = ('scriptarchive.com','temple.com');

    # @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\@temple.com');

    # %recipient_alias = (
    # '1' => '[email protected]',#
    #'2' => '[email protected]',#
    #'3' => '[email protected]',#
    can anyone help me. i've tried many different ways but only if i comment out the '1' does it send the email. what am i doing wrong?
    here's the Read me text that offers help. i still can't figure it out. also i can't find %recipien_alias in the original FormMail script so i've added it to the code as above
    @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' => '[email protected]',
    '2' => '[email protected]',
    '3' => '[email protected]',

    In the HTML form that should submit to the recipient
    '[email protected]', 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_to
    Last edited by red dog; Sep 29, 2006, 11:24 AM. Reason: not complete code and help file.

  • #2
    see other forum where you have this same question posted.