The template is contained in a file residing at the host. It can contain fields pertaining to the email format, fields pertaining to the response format and fields that pertain to both. Thus, a single file allows the formatting for both the email and the response. Along with the fields, which specify variable information, is text corresponding to fixed information. The text can simply be explanatory or can represent html code.
To use this package for an application, two files need to be created, the source file and the template file. The source file contains html code including a single form intended to be filled-in by a site visitor. Included in the form are several hidden fields that are needed. These are:
<HTML> <HEAD> <TITLE>Test flexmail</TITLE> </HEAD> <BODY Background="" BGColor=#ffffff Text=#000000 Link=#0000ff VLink=#800080 ALink=#ff0000> <center><h1>Flexmail Test Page</h1> <h2>Please fill out this form</h2> <form name=aform action="http://www.mich.com/~buffalo/rhp/flexmail.cgi" method="post"> <input type=hidden name=email_from value="buffalo@mich.com"> <input type=hidden name=email_subject value="Information that you submitted"> <input type=hidden name=email_form_to value="buffalo@mich.com"> <input type=hidden name=template_filename value="flextest.temp"> <input type=submit value="send"></center> <br>Select a color to include in both the email and response. <select name=colorboth size=1> <option value="red">red</option> <option value="yellow">yellow</option> <option value="orange">orange</option> <option value="blue">blue</option> <option value="purple">purple</option> </select> <br>Choose a color to be included in the email only <select name=coloremail size=1> <option value="red">red</option> <option value="yellow">yellow</option> <option value="orange">orange</option> <option value="blue">blue</option> <option value="purple">purple</option> </select> <br>Choose a color to be included in the response only <select name=colorresponse size=1> <option value="red">red</option> <option value="yellow">yellow</option> <option value="orange">orange</option> <option value="blue">blue</option> <option value="purple">purple</option> </select> <br>Choose the quantity and item from the following lists <table border=5> <tr><td>Quantity</td><td>Item</td></tr> <tr> <td><select name=qty1 size=1> <option value"0">0</option> <option value"1">1</option> <option value"2">2</option> <option value"3">3</option> <option value"4">4</option> </select></td> <td><select name=item1 size=1> <option value"car">car</option> <option value"boat">boat</option> <option value"plane">plane</option> <option value"train">train</option> <option value"bike">bike</option> </select></td> <tr> <td><select name=qty2 size=1> <option value"0">0</option> <option value"1">1</option> <option value"2">2</option> <option value"3">3</option> <option value"4">4</option> </select></td> <td><select name=item2 size=1> <option value"pie">pie</option> <option value"cake">cake</option> <option value"donut">donut</option> <option value"cookie">cookie</option> <option value"bread">bread</option> </select></td> <tr> <td><select name=qty3 size=1> <option value"0">0</option> <option value"1">1</option> <option value"2">2</option> <option value"3">3</option> <option value"4">4</option> </select></td> <td><select name=item3 size=1> <option value"dog">dog</option> <option value"cat">cat</option> <option value"cow">cow</option> <option value"horse">horse</option> <option value"pig">pig</option> </select></td> <tr> <td><select name=qty4 size=1> <option value"0">0</option> <option value"1">1</option> <option value"2">2</option> <option value"3">3</option> <option value"4">4</option> </select></td> <td><select name=item4 size=1> <option value"table">table</option> <option value"chair">chair</option> <option value"lamp">lamp</option> <option value"desk">desk</option> <option value"pen">pen</option> </select></td> </table> </form> </BODY> </HTML>
<HTML> <HEAD> <TITLE>Test flexmail</TITLE> </HEAD> <BODY Background="" BGColor=#ffffff> <center> <r&<h2>This information should appear in the response</h2>&r> <e&<h2>This information should appear in the email</h2>&e> </center> You selected the color &colorboth for both response and email.<br> <e&You selected the color &coloremail for email.<br>&e> <r&You selected the color &colorresponse for the response.<br>&r> You selected the following:<br> <& quantity &&qty of &item <br> &> <br>End of test. </BODY> </HTML>
Another version of this mailer is tempmail, which includes the template within the html. The template is
inserted between textarea tags and is sent to the server when the form is submitted.
Test sample of tempmail