This page documents email.cgi version 2.0.1
The current version of email.cgi is 2.0.1 and is available at ftp://ftp.lib.ncsu.edu/pub/software/mac/email-cgi.hqx.
Email.cgi requires:
Email.cgi also requires a forms-capable WWW browser at the client end.
Download the scripting additions and read their instructions. Most importantly, install the scripting additions themselves into the Scripting Additions folder of your Extenstions Folder of your System Folder.
The email.cgi AppleScript itself requires no configuration, but if you do happen to edit it, make sure you save it as an application that stays open and never shows a startup screen.
All the configuration for email.cgi lies in the form calling email.cgi. Below is a generic, but valid form for sending commands to email.cgi:
<html> <head> <title>Send a message to Eric Lease Morgan</title> </head> <body> <H2>Send a message to Eric Lease Morgan (eric_morgan@ncsu.edu)</H2> <FORM METHOD="POST" ACTION="http://emorgan.lib.ncsu.edu/email.cgi"> <INPUT TYPE="hidden" NAME="to_name" VALUE="Eric Lease Morgan"> <INPUT TYPE="hidden" NAME="to_address" VALUE="eric_morgan@ncsu.edu"> <INPUT TYPE="hidden" NAME="mailer" VALUE="mail-relay.ncsu.edu"> What is your name?<BR> <INPUT TYPE="text" NAME="from_name" SIZE="40" MAXLENGTH="40"><P> What is your email address<BR> <INPUT TYPE="text" NAME="from_address" SIZE="40" MAXLENGTH="40"><P> What is the subject of your message<BR> <INPUT TYPE="text" NAME="subject" SIZE="40" MAXLENGTH="40"><P> What do you want to say?<BR> <TEXTAREA NAME="message" ROWS=6 COLS=40></TEXTAREA><P> <INPUT TYPE="Submit" VALUE="Send the message"> <INPUT TYPE="reset" VALUE="Reset"> </FORM> </body> </html>Here is how to edit this generic form to meet your needs:
After editing your form, save it, and point to it via another HTML document. For example, if my Macintosh server is up and running, then you can send me mail at eric_morgan@ncsu.edu.
If all works well, you should get back some feedback telling you the message has been queued for delivery. Otherwise, you will recieve an error message.
- 1. PARSE ERROR
- This error occurs while trying to parse the post data from the form. Make the NAME fields of the form have not been changed, and make sure you have entered informaiton into every field of the form.
- 2. COMMUNICATIONS ERROR
- This error occurs while trying to send your message. Make sure the mailer you specifiy is a valid mailer, and make sure you have entered your full and complete email address.
- 3. FEEDBACK ERROR
- This error shouldn't ever happen because I've looked and looked at this code and if you didn't get a parse error, then you shouldn't get anything here.
Version 2.0 (July 10, 1995) - After being given an SMTP library from Atul Butte, I changed the script to include the HELO command for initialting SMTP communications. This, as well as a few slight modifications to the library should make email.cgi work happily with MailShare. Whew! I also upgraded the script with the use of the Parse CGI OSAX thus eliminating the tedious method of extracting the POST arguments from the FORM. Very nice! Lastly, I added much more error trapping and consequently, it is no less prone to returning garbage.
Version 1.0.2 (January 6, 1995) - Prompted by Todd Main, and using code from Tom Coradeschi, I changed email.cgi to inclued the ability to send the end-user's name as well as their adress in the email header. "Thanks guys!"
Version 1.0.1 (November 9, 1994) - IMHO, the TCP Scripting Additions version 1.1.2 were not backwards compatible with version 1.1. Specifically, the calls to the ISO translation tables were changed. Consequently, the older compiled version of email.cgi did not work. By installing the newer version of the Scripting Additions (1.1.2) and recompiling email.cgi, the problems with email.cgi and Scripting Additions have disappeared. Thus, email.cgi version 1.0.1 is not backwards compatible either. Arggg...
Version 1.0 (November 2, 1994) - original release
Go to library's home page. Go to NCSU's home page.
<URL:http://www.lib.ncsu.edu/staff/morgan/email-cgi.html>