Re: Addition to the FORM tag

Peter Flynn (
23 Sep 1996 14:53:54 +0100

Date: 23 Sep 1996 14:53:54 +0100
From: Peter Flynn <>
Subject: Re: Addition to the FORM tag
In-reply-to: <> (message from Brent Maxwell on 22
Message-id: <>

   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

	env |\
		grep '^WWW\_' |\
		awk 'BEGIN {FS="=";OFS="";dq=sprintf("%c",34)} \
			{print "echo ",var,"	=	\\",dq,"$",$1,"\\",dq}' \

	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="">

(GET also works, of course).