Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Mail Question

by pschoonveld (Pilgrim)
on Apr 13, 2000 at 22:52 UTC ( #7509=note: print w/ replies, xml ) Need Help??

in reply to Mail Question

Well, I prefer to do most of everything by hand. Means less overhead from the modules. Please enjoy the following:

The following uses as an easy way to deal with CGI vars. Sends me email from any web form. Prints each var "paco=taco" format.

#!/usr/bin/perl use CGI qw(:standard); @submits = param(); open(MAIL, "|/usr/sbin/sendmail -oi -t") or die "Can't Open Sendmail: +$!"; print MAIL <<EOF; From: Web Page To: patrick\ Subject: Web Form Submission EOF foreach $item (@submits) { print MAIL "$item=".param($item)."\n"; } close(MAIL); print "Location: ../thank_you.html\n\n";
At the end it tells the browser to go to an html page.

Comment on Re: Mail Question
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://7509]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2016-02-12 02:51 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (388 votes), past polls