- From: Peter Flynn <pflynn@curia.ucc.ie>
- Date: 23 Sep 1996 14:53:54 +0100
- To: brentm@geocities.com
- Cc: www-html@w3.org
One thing I've found that is a pain, is making a cgi script for sending form data to an e-mail address. I'm thinking a nice idea would be an addition to the FORM tag that would allow you to define the METHOD as MAIL, or something like that, and then in the ACTION part, you'd put an e-mail address to send to. It would make a routine job much easier. Any comments on this, I'd be glad to hear them. Use UNCGI in your cgi-bin directory. Then modify the following to your taste: echo Content-type: text/plain echo env |\ grep '^WWW\_' |\ awk 'BEGIN {FS="=";OFS="";dq=sprintf("%c",34)} \ {var=substr($1,5,length($1)-4)} {print "echo ",var," = \\",dq,"$",$1,"\\",dq}' \ >/tmp/spewback$$ sh /tmp/spewback$$ /bin/rm -f /tmp/spewback$$ This just lists the variables used, plus their values, back to the user, but you can modify it to mail the results anywhere. Members of this group may test forms against a similar script on my server using <form method="post" action="http://www.ucc.ie/cgi-bin/uncgi/formtest"> (GET also works, of course). ///Peter
Received on Monday, 23 September 1996 09:56:25 UTC