Article 14536 of comp.infosystems.www:
Xref: feenix.metronet.com comp.infosystems.www:14536
Path: feenix.metronet.com!news.utdallas.edu!wupost!spool.mu.edu!howland.reston.ans.net!gatech!swrinde!elroy.jpl.nasa.gov!ames!olivea!sgigate.sgi.com!fido.asd.sgi.com!krypton.engr.sgi.com!gavin
From: gavin@krypton.engr.sgi.com (Gavin Bell)
Newsgroups: comp.infosystems.www
Subject: Re: E-mail form WWW
Date: 29 Apr 1994 19:31:47 GMT
Organization: Silicon Graphics, Inc., Mountain View, CA
Lines: 39
Message-ID: <2prnb3$jg3@fido.asd.sgi.com>
References: <2phtrj$5ba@interlog.com>
NNTP-Posting-Host: krypton.engr.sgi.com

In article <2phtrj$5ba@interlog.com>, Matt Harrop <mharrop@interlog.com> wrote:
>Could someone please point me to information about how to impliment a link
>in a html document that will allow the client to send e-mail to a specific
>address?  I'd like to put a link at the end of each document that will
>allow a client to send a comment to the author of the document.
>mharrop@interlog.com

I just did this.

I started with form-mail, an excellent perl script written by
Reuven M. Lerner (reuven@the-tech.mit.edu).  I got it from:

http://info.cern.ch/hypertext/WWW/Tools/Overview.html

#[webmaster , June 95]# this is now:# 
#http://www.w3.org/hypertext/WWW/Tools/Overview.html

... in the CGI Archive section (FTP).

I then modified the perl script a little bit so that the e-mail
address that the form should be sent to would be in the HTML instead
of hard-coded in the perl script-- that will allow one script to send
mail to lots of different people.

My additions are here; get the original stuff from info.cern and it
will be obvious where they go in form-mail.pl:

# Make sure we know who to mail to...
if (! $ARGV[0]) {
    print "Content-type: text/html\n\n";
    
    # Oops
    print "<Head><Title>form-mail error</Title></Head>";
    print "<Body><H1>Oops</H1>";
    print "The ACTION URL for this form is missing";
    print "who to mail stuff to; the correct format is:";
    print "&lt;FORM method=POST ACTION=\"http://somewhere/cgi-bin/form-mail.pl?email-address\"&gt;";

    exit 0;
}
$recipient = $ARGV[0];
-- 
--gavin     (gavin@sgi.com,  (415)390-1024)


