Scott Bryce wrote:
> C. David Rossen wrote:
>> I am looking for a script that will send an email to whatever address is
>> entered into the text box. I usually use formmail.pl, but with that, the
>> recipient is a hidden field and is specified in the html code. I want
>> to use that, but I want the email to also be sent to the address that is
>> entered in the email text box.
>
> My apologies if I'm wandering off topic, but doesn't that create an open
> relay? It seems that a spammer could exploit the script and use it to
> send spam through your mail server.
I pointed the OP to a module I wrote which does just that, and I believe
the keyword is "also". A message sent via the module goes both to a
pre-destinated recipient and the entered address (which normally is the
real sender...). That, together with the fact that the originating IP
address is stated in one of the message headers, should reasonably make
the module unattractive for spamming.
Actually, the reason I wrote CGI::ContactForm was to make it more
difficult for spammers (it allows you to very easily replace
mailto-links with contact forms), and I'm convinced it serves that
purpose. During the two years the module has been available I have never
heard of any occurrence of abusing it for spamming.
--
Gunnar Hjalmarsson
Email:
http://www.gunnar.cc/cgi-bin/contact.pl