FormMail.java

Download and Instructions

Thank you for your interest in FormMail(c). We hope you enjoy it! If you have any questions regarding the installation or use of FormMail, please contact us at tcole@net-corp.com. Or if you prefer you can use our preformatted form. A current bug/problems list is available. If you send us an e-mail to let us know you downloaded, we'll advise you as these issues are addressed. If you request, we'll even attach a new copy of the .zip file.

Download
The FormMail download contains the following: Please note that FormMail is not freeware. Once our secure commerce has been completed we will be able to conduct secure purchase and download transactions from our site. Until then, please contact us at tcole@net-corp.com with any purchasing inquiries.

A 10-day free preview is available if you complete our Preview Form and let us know where to e-mail it!

Installation
To install the files you will need to do the following:

  • Unzip the .zip file in to the desired directory.
  • That's it!

Adding To Your HTML Documents
To add FormMail to your site, you simply add the following tag to your document(s):

<APPLET CODEBASE="where/you.put.it" CODE="FormMail.class" WIDTH=10 HEIGHT=10>
<PARAM NAME="script" VALUE="filename.extension">
<PARAM NAME="bgcolor" VALUE="rrr,ggg,bbb">
<PARAM NAME="recipient" VALUE="email@recipient.com">
<PARAM NAME="subject" VALUE="Subject message">
<PARAM NAME="comment" VALUE="Additional Comments">
<PARAM NAME="verify" VALUE="true|false">
<PARAM NAME="debug" VALUE="true|false">
</APPLET>

Notes:
  • The bgcolor parameter should contain three integer values between 0..255 that correspond to the red, green and blue values of the color you want. (For example white = "255,255,255", black = "0,0,0"). If you do not know the rgb values of the color you want, use a graphics program like Corel© PhotoPaint or Adobe© PhotoShop.
  • The recipient is the email address of the person to receive the email. This should be yourself. Sending unsolicited mail to anyone other than yourself is considered poor net-iquette.
  • The subject parameter contains the text to display in the Subject: header.
  • The comment parameter should contain additional comments that you wish to be sent with the form information.
  • The verify parameter notifies FormMail whether it should verify that all fields were completed. When set to "true" FormMail will not send an incomplete form and will notify the user of which fields need to be completed. If set to false, the form will be mailed "as is".
  • Please note that the email message body will contain a series of Name = value pairs, each on it's own line..
  • The debug option echos each component and it's values to the java console as it created.

FormMail's Scripting Language & Example tag
FormMail uses an easy to learn scripting language to define the form's appearance. Much simpler than creating an HTML form, FormMail's scripting language allows the user to define the AWT components to use in the form, their labels, and layout.

Below is a sample script and <APPLET></APPLET> tag that creates the following simple form:

Script:

Label {
   text = "Name:";
   gridx = "0";
   gridy = "0";
}
Textfield {
   name = "Name";
   width = "50";
   columnspan = "2";
   gridx = "1";
   gridy = "0";
}
Label {
   text = "Address:";
   gridx = "0";
   gridy = "1";
}
Textarea {
   name = "Address";
   width = "50";
   height = "3";
   columnspan = "2";
   gridx = "1";
   gridy = "1";
}
Label {
   text = "e-mail:";
   gridx = "0";
   gridy = "2";
}
Textfield {
   name = "e-mail";
   width = "50";
   columnspan = "2";
   gridx = "1";
   gridy = "2";
}
Label {
   text = "To:";
   gridx = "0";
   gridy = "3";
}
Recipient {
   width = "50";
   columnspan = "2";
   gridx = "1";
   gridy = "3";
}
Label {
   text = "Message:";
   gridx = "0";
   gridy = "4";
}
Textarea {
   name = "Message";
   width = "50";
   height = "10";
   columnspan = "2";
   gridx = "1";
   gridy = "4";
}
Label {
   text = "Do you like this applet?";
   columnspan = "3";
   gridx = "0";
   gridy = "5";
}
Radio {
   label = "Yes";
   gridx = "1";
   gridy = "6";
}
Radio {
   label = "No";
   gridx = "1";
   gridy = "7";
}
Label {
   text = "Where did you find this applet?";
   columnspan = "3";
   gridx = "0";
   gridy = "8";
}
Checkbox {
   label = "Gamelan";
   gridx = "0";
   gridy = "9";
   checked = "true";
}
Checkbox {
   label = "JARS";
   gridx = "1";
   gridy = "9";
}
Checkbox {
   label = "Java Ctr.";
   gridx = "2";
   gridy = "9";
}
Label {
   text = "Would you use this applet again?";
   columnspan = "3";
   gridx = "0";
   gridy = "10";
}
Choicebox {
   name = "would you use again";
   gridx = "1";
   gridy = "11";
   option = "Yes";
   option = "No";
   option = "Only if you payed me money";
}
Submit {
   gridx = "1";
   gridy = "12";
}
Clear {
   gridx = "2";
   gridy = "12";
}
END_FILE

Applet Tag:

<APPLET CODE="FormMail.class" WIDTH=450 HEIGHT=475>
<PARAM NAME=script VALUE="demo.fm">
<PARAM NAME=recipient VALUE="tcole@net-corp.com">
<PARAM NAME=subject VALUE="FormMail Demonstration">
<PARAM NAME=bgcolor VALUE="191,191,160">
<PARAM NAME=verify VALUE="false">
<PARAM NAME=comment VALUE="Sent from N.S.S. site">
<PARAM NAME=debug VALUE="true">
</APPLET>

Yes that's right. This script and <APPLET></APPLET> tag was all it took to create the above form, including the SMTP mail client!

The valid set of components include:

Textfield {
   name = "string";
   width = "pixels";
   columnspan = "integer";
   passwordchar = "char";
   gridx = "int";
   gridy = "int";
   verify = "true|false";
}
Textarea {
   name = "string";
   width = "pixels";
   height = "int";
   columnspan = "integer";
   rowspan = "integer";
   gridx = "int";
   gridy = "int";
   verify = "true|false";
}
Recipient {
   width = "pixels";
   columnspan = "integer";
   gridx = "int";
   gridy = "int";
}
Subject {
   width = "pixels";
   columnspan = "integer";
   gridx = "int";
   gridy = "int";
}
Checkbox {
   label = "string";
   columnspan = "integer";
   gridx = "int";
   gridy = "int";
   checked = "true | false";
}
Radio {
   label = "string";
   columnspan = "integer";
   gridx = "int";
   gridy = "int";
   checked = "true | false";
   groupname = "string";
}
Label {
   text = "string";
   columnspan = "integer";
   gridx = "int";
   gridy = "int";
}
Submit {
   columnspan = "int";
   rowspan = "int";
   gridx = "int";
   gridy = "int";
}
Clear {
   columnspan = "int";
   rowspan = "int";
   gridx = "int";
   gridy = "int";
}
Choicebox {
   name = "string";
   columnspan = "int";
   gridx = "int";
   gridy = "int";
   option = "string";
      :
   option = "string";
}
   


Known Issues
As of now, the following planned improvements are scheduled: (as of Nov. 28th, 1996)

  1. Control of tabbing between input fields.
  2. More custom control of component placement (i.e. left-justified, right-justified, etc).
  3. A script debugging tool will also be included.

Please note that anyone who orders FormMail will receive the above upgrades at no additional cost, when they become available.

All of these items will be addressed and fixed shortly. If you send us e-mail, we will advise you as these problems are fixed.


For more information on additional Internet applications provided by the design team at N.S.S., Inc., please review our Products Profile page, our feel free to browse our entire site.

It's easy to see that unless the N.S.S. button is on your site, you probably paid too much!

Created by