Looking for way to block spam using formmail.

They have: 26 posts

Joined: Apr 2000

Hi,

When using formmail, is there a way to define who the email is sent to within the CGI script instead of using the actual email address on the HTML page?

For example, on your HTML form, instead of defining the recipient as an email address, such as:

<input type=hidden name="recipient" value="[email protected]">

Couldn't you define it as say a mailbox? Or whatever term you like, such as:

<input type=hidden name="recipient" value="mailbox 1">

Then you simply write into your script the address for "mailbox 1".

This way you would get the mail without having an actual email address showing.

Or is there another way of doing it with formmail?

Thanks

They have: 568 posts

Joined: Nov 1999

Well, I suppose you could do that and osmewhere before the email is sent inside formail have something that says

$form{'recipient'} =~ s/Mailnox 1/[email protected]/;

that would replace it within the CGI program so no one could read your email unless they had access to the source of the program.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.