The poor man's mailto: <FORM>

Not everyone is blessed with the divine privilege of copy something to a servers /cgi/ directory. So I had to come up with something else.

The solution make my users (reading my home page on the WEB) able to fill in a form, and then send all the information the a specific mail address, and the information will then be processed on the mail-client side and ends up on the screen for every message (optional) and logged in a files where the values is separated with semi-colon ";".

What do I need to use this solution

  • Windows 95 or Windows NT
  • Pegasus Mail (freeware) or any other mailsystem that can filter our different messages on basis of the content in the mail, dump it to a file, and then run a program. Pegasus do all this things an a lot more, and it's FREE!
  • A mail processing program (freeware). The output of this file may be used of the Mail-merge capabilities of Pegasus Mail
  • And of cource your own e-mail account and home page.
  • Step by step explanation
  • Download the programs. Install Peagasus and copy TRF.EXE to the Pegasus directory (C:\PMAIL).
  • HOMEPAGE

  • Add the a form to your home page. This may look like this;

    I want the training course in
    Name: Organization: Phonenumber:

    <FORM METHOD=POST ACTION="mailto:espenjo@c2i.net" >
    	<input type=hidden name=appType value="Page1" >
    	<b>I want</b >
    	<select name="Order" >
    		<option >information about
    		<option >to order
    		<option >to cancel
    	</select >
    	<b > the training course in </b >
    	<select name="Kurs" >
    		<option >C++
    		<option >MS-Access97
    		<option >VB 5.0
    		<option >Lotus WordPro
    	</select ><BR >
    	<b >Name:</b >
    	<INPUT NAME="Name" size=20 MAXLENGTH=100 Value="Ola Nordmann" >
    	<b >Organization:</b >
    	<INPUT NAME="Organization" size=20 MAXLENGTH=100 Value="Acme computers ltd." >
    	<b >Phonenumber:</b >
    	<INPUT NAME="Phoneumber" size=20 MAXLENGTH=100 Value="" ><BR >
    	<INPUT TYPE="Submit" VALUE="Send">
    </FORM >
    
  • When the user sends the form, it will be sendt to the specified mailadress (in blue in the HTML example) through his mailsystem, and ends up in the mailbox of espenjo@c2i.net.
  • Windows95 & MS-DOS

  • Create a directory named MAILLIST below the Pegasus menu; C:\PMAIL\MAILLIST
  • You must create one MS-DOS batch file (in the example c:\pmail\maillist\subscribe.bat) for each form you create, because the variable names is not stored in the log file. Store this batch file in the C:\PMAIL\MAILLIST directory. In this example we use only one page. Each form should have it's own ID, please refer to the green HTML code over. In this example Page1 is used as an ID. This should be different for every set of variables, so Pegasus can know where to log the information.
  • The batch file may look like this;

    c:\trf.exe /d c:\pmail\maillist\dump.txt c:\pmail\maillist\new_epi.txt

    Usage of TRF.EXE;
    TRF.EXE [/d] infile [outfile]
    /d = display valus
    infile = the text file dumpt in Peagus
    outfile = the logged information

  • Start the "Windows Explorer" and find the batchfiles. Change the properies to "Close on Exit" under the "Program folder"
  • From the desktop in Win95, select the "My computer Icon", selct the "View" menu and then the "Folder Option". You must specify a new filetype ATT;
  • You do not need to use Peagaus as your default mail-system, but you could let Pegasus delete the messages from the Server, and configure all other mailsystems to "Leave mesage on server" and "Do only read unread messages".
  • PEGASUS

  • Create a maillist in Peagsus. Press F6 and add a new one with the nessesary information
  • Enter the "Tools meny", "Mail filtering rules", "Rules applied when folder is opend". Add a filter that dumpt any messages to the file c:\pmail\maillist\dump.txt when he finds the string "apptype=" in the message;
  • Then you make a filter that runs a batchfile dependig on value of the appType= variable;
  • OUTPUT

    This process will produce one textfile for each form, looking like this;

    
    "Espen Joranger" ;Sun, 14 Dec 1997 11:20:01 +0100 (MET);2;Subscribe;Philosophy;test@usa.net
    "Jimmy Nielsen" ;Sun, 14 Dec 1997 19:31:01 +0100 (MET);2;Subscribe;Subscribe;Philosophy;Jnilsen@usa.net
    "Espen Joranger" ;Sun, 14 Dec 1997 11:20:01 +0100 (MET);2;Unsubscribe;Philosophy;test@usa.net
    
    and a screen output (if the /d option is used with TRF.EXE);

    This is a delimited file, witch meens that you can;

  • Import it into a spreadsheet
  • Import it into a database
  • Use ut in a Mail-Merge process (in Peagsus)
  • Use it as a datafile in a Dynamical HTML (MS-IE 4.0) script
  • PROBLEMS
  • This technic is not as bulltproof as stable as the CGI technic, because it's depending on a complete and error free installation of the mailsystem with the client. If you are able to use CGI's againt your homepage, you should use them.
  • It seems to be a problem (only experienced with IE-4.0) when you establish the connection to your internet service provider (ISP) through another mailsystem than your default mailsystem. Pegasus should NOT be the default mailsystem.
  • EXAMPLES
    Check out this pages;
  • yearly distribution
  • monthly distribution
  • weekly distribution
  • Plans devided into sections
  • Simple personal overview
    Remeber that all this pages is pure HTML (no script, no Java and external graphic files). All information nessesary to create this files is stored in the table it self.

    From the homepage of Espen Joranger