Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Script that sends email to text box value

Reply
Thread Tools

Script that sends email to text box value

 
 
C. David Rossen
Guest
Posts: n/a
 
      03-20-2005
Hello:

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. Any help would be greatly appreciated. Thanks.

David


 
Reply With Quote
 
 
 
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      03-20-2005
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.


Even if this is not the right place to look for ready-to-go scripts, I
can't help notice that the CPAN module CGI::ContactForm meets your
somewhat vague specification.

http://www.gunnar.cc/contactform/readme.html

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
 
 
 
Martin Kissner
Guest
Posts: n/a
 
      03-20-2005
C. David Rossen wrote :
> Hello:
>
> 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. Any help would be greatly appreciated. Thanks.


There are several modules on CPAN to support sending mail i. e.
Mail::Internet

HTH
Martin

--
perl -e '$S=[[73,116,114,115,31,96],[108,109,114,102,99,112],
[29,77,98,111,105,29],[100,93,95,103,97,110]];
for(0..3){for$s(0..5){print(chr($S->[$_]->[$s]+$_+1))}}'
 
Reply With Quote
 
Scott Bryce
Guest
Posts: n/a
 
      03-21-2005
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. Any help would be greatly appreciated. Thanks.


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.
 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      03-21-2005
C. David Rossen <(E-Mail Removed)> wrote:

> I am looking for a script



We discuss *writing* programs here.

Are you having trouble writing a Perl program that does what you want?


> I usually use formmail.pl,



Gulp.


> I want to use
> that,



Bad, bad idea!


> Any help would be greatly appreciated.



This is more helpful than you are likely to realize:

Don't use Matt's formmail.pl !


--
Tad McClellan SGML consulting
http://www.velocityreviews.com/forums/(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      03-21-2005
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
div box questions; float text around a box, fit box to image size Gnarlodious HTML 4 05-05-2010 11:30 AM
IMS queues when Outlook client sends email but sends fine with OWA??? =?Utf-8?B?c2hhb2xpbmRy?= MCSE 1 05-17-2004 12:01 PM



Advertisments