WebMailer ProTM

version 1.01

 

TABLE OF CONTENTS

 

1. End-User License Agreement

 

2. What is WebMailer Pro?

2.1 Definition and features

2.2 How does WebMailer Pro work?

 

3. Installing WebMailer Pro

    1. System Requirements
    2. Running SETUP.EXE Installation Program
    3. Choosing a Directory for Executable/Documentation
    4. Choosing a Directory for Sample HTML Forms
    5. Installing on Netscape Commerce/Enterprise Server
    6. Installing on Microsoft IIS or PWS Web Servers
    7. Installing on Other Web Server Software
    8. Installing on a Remote Web Server

 

4. Using WebMailer Pro

4.1 An Overview of Forms

4.2 WebMailer Pro Form Variables

4.3 Simple Form Sample

 

5. Template Files

5.1 What are Templates?

5.2 Special Characters

5.3 Creating Templates

5.4 Using Templates

5.4.1 E-mail Template Files

5.4.2 Web Template Files

5.5 Advanced Templates

5.6 Template Example

 

6. Technical Support

6.1 Common Problems (Quick Tips)

6.2 Contacting GeoCel International

 

APPENDICES

Appendix A: Glossary of Terms

Appendix B: WEBMLR.INI File

Appendix C: Form Variables Available in CGI Environment

 

 

1. End-User License Agreement

 

 

WebMailer Pro Version 1.01

 

READ THE TERMS AND CONDITIONS OF THIS END-USER LICENSE AGREEMENT (REFERRED TO AS "EULA") CAREFULLY BEFORE OPENING THE PACKAGE CONTAINING THE PROGRAM DISKETTES, THE COMPUTER SOFTWARE THEREIN, PRINTED MATERIALS, AND ‘ONLINE’ OR ELECTRONIC DOCUMENTATION AND THE ACCOMPANYING USER DOCUMENTATION (THE "PROGRAM"). THE PROGRAM IS COPYRIGHTED AND LICENSED (NOT SOLD). BY OPENING THE PACKAGE CONTAINING THE PROGRAM, YOU ARE ACCEPTING AND AGREEING TO THE TERMS OF THIS LICENSE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY THE TERMS OF THIS LICENSE AGREEMENT, YOU SHOULD PROMPTLY RETURN THE PACKAGE IN UNOPENED FORM, AND YOU WILL RECEIVE A REFUND OF YOUR MONEY. THIS LICENSE AGREEMENT REPRESENTS THE ENTIRE AGREEMENT CONCERNING THE PROGRAM BETWEEN YOU AND GEOCEL INTERNATIONAL, INC (REFERRED TO AS "LICENSOR"), AND IT SUPERSEDES ANY PRIOR PROPOSAL, REPRESENTATION, OR UNDERSTANDING BETWEEN THE PARTIES.

 

1. License Grant. Licensor hereby grants to you, and you accept, a nonexclusive license to use the Program Diskettes and the computer programs contained therein in machine-readable, object code form only (collectively referred to as the "Software"), and the accompanying User Documentation, only as authorized in this License Agreement. The Software may be used only on a single storage device, such as a computer server, owned, leased, or otherwise controlled by you; or in the event of the inoperability of that computer, on a backup computer selected by you. Neither concurrent use on two or more storage devices (computer servers) nor use in a local area network or other network is permitted without separate authorization and the payment of other license fees. You agree that you will not assign, sublicense, transfer, pledge, lease, rent, or share your rights under this License Agreement. You agree that you may not reverse engineer, decompile, disassemble, reverse compile, or otherwise translate the Software.

 

Upon loading the Software into your computer, you may retain the Program Diskettes or applications (if delivered without diskette) for backup purposes. In addition, you may make one copy of the Software on a second set of diskettes (or on cassette tape or other storage media) for the purpose of backup in the event the Program Diskettes are damaged or destroyed. You may make one copy of the User's Manual for backup purposes. Any such copies of the Software or the User's Manual shall include Licensor's copyright and other proprietary notices. Except as authorized under this paragraph, no copies of the Program or any portions thereof may be made by you or any person under your authority or control.

 

2. Licensor's Rights. You acknowledge and agree that the Software and the User's Manual are proprietary products of Licensor protected under U.S. copyright law and international copyright treaties, as well as other intellectual property laws and treaties. You further acknowledge and agree that all right, title, and interest in and to the Program, including associated intellectual property rights, are and shall remain with Licensor. This License Agreement does not convey to you an interest in or to the Program, but only a limited right of use revocable in accordance with the terms of this License Agreement. All title and copyrights in and to the PROGRAM (including but not limited to any images, photographs, animations, video, audio, music, text, and "applets" incorporated into PROGRAM), the accompanying printed materials, and any copies of the PROGRAM are owned by GeoCel or its suppliers.

 

3. Dual-Media Software. You may receive the PROGRAM in more than one medium. Regardless of the type or size of medium you receive, you may use only one medium that is appropriate for your single computer server/storage device. You may not use or install the other medium on another computer. You may not loan, rent, lease, or otherwise transfer the other medium to another user, except as part of the permanent transfer (as provided above) of the PROGRAM.

 

4. License Fees. The license fees paid by you are paid in consideration of the licenses granted under this License Agreement.

 

5. Support Services. GeoCel may provide you with support services related to the PROGRAM. Use ("Support Services"). Use of Support Services is governed by the GeoCel policies and programs described in the user manual, in "online" documentation, and/or in other GeoCel-provided materials. Any supplemental software code provided to you as part of the Support Services shall be considered part of the PROGRAM and subject to the terms and conditions of this EULA. With respect to technical information you provide to GeoCel as part of the Support Services, GeoCel may use such information for its business purposes, including for product support and development. GeoCel will not utilize such technical information in a form that personally identifies you.

 

6. Upgrades. If the PROGRAM is labeled as an upgrade, you must be properly licensed to use a product identified by GeoCel as being eligible for the upgrade in order to use the PROGRAM. A PROGRAM labeled as an upgrade replaces and/or supplements the product that formed the basis for your eligibility for the upgrade. You may use the resulting upgraded product only in accordance with the terms of this EULA. If the PROGRAM is an upgrade of a component of a package of software programs that you licensed as a single product, the PROGRAM may be used and transferred only as part of that single product package and may not be separated for use on more than one computer.

7. Term. This License Agreement is effective upon your opening of this package and shall continue until terminated. You may terminate this License Agreement at any time by returning the Program and all copies thereof and extracts therefrom to Licensor. Licensor may terminate this License Agreement upon the breach by you of any term hereof. Upon such termination by Licensor, you agree to return to Licensor the Program and all copies and portions thereof.

 

8. Limited Warranty. Licensor warrants, for your benefit alone, for a period of 90 days from the date of commencement of this License Agreement (referred to as the "Warranty Period") that the Program Diskettes in which the Software is contained are free from defects in material and workmanship. Licensor further warrants, for your benefit alone, that during the Warranty Period the Program shall operate substantially in accordance with the functional specifications in the User's Manual. If during the Warranty Period, a defect in the Program appears, you may return the Program to Licensor for either replacement or, if so elected by Licensor, refund of amounts paid by you under this License Agreement. You agree that the foregoing constitutes your sole and exclusive remedy for breach by Licensor of any warranties made under this Agreement. EXCEPT FOR THE WARRANTIES SET FORTH ABOVE, THE PROGRAM, AND THE SOFTWARE CONTAINED THEREIN, ARE LICENSED "AS IS," AND LICENSOR DISCLAIMS ANY AND ALL OTHER WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

 

9. Limitation of Liability. Licensor's cumulative liability to you or any other party for any loss or damages resulting from any claims, demands, or actions arising out of or relating to this Agreement shall not exceed the license fee paid to Licensor for the use of the Program. In no event shall Licensor be liable for any indirect, incidental, consequential, special, or exemplary damages (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE PRODUCT, even if Licensor has been advised of the possibility of such damages. SOME STATES DO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION OR EXCLUSION MAY NOT APPLY TO YOU.

 

10. Trademark. GeoCel International, Inc. is a trademark of Licensor. No right, license, or interest to such trademark is granted hereunder, and you agree that no such right, license, or interest shall be asserted by you with respect to such trademark.

 

11. Governing Law. This License Agreement shall be construed and governed in accordance with the laws of the State of Texas.

 

12. Costs of Litigation. If any action is brought by either party to this License Agreement against the other party regarding the subject matter hereof, the prevailing party shall be entitled to recover, in addition to any other relief granted, reasonable attorney fees and expenses of litigation.

 

13. Severability. Should any term of this License Agreement be declared void or unenforceable by any court of competent jurisdiction, such declaration shall have no effect on the remaining terms hereof.

 

14. No Waiver. The failure of either party to enforce any rights granted hereunder or to take action against the other party in the event of any breach hereunder shall not be deemed a waiver by that party as to subsequent enforcement of rights or subsequent actions in the event of future breaches.

 

 

 

2. What Is WebMailer Pro?

 

2.1 What Is WebMailer Pro?

WebMailer Pro is a form-to-e-mail Common Gateway Interface (CGI ) application that processes HTML form data and sends it in a customizable format to a standard Internet e-mail account. Popular applications are guestbook forms and user feedback forms, and other applications that require that form data be sent to an e-mail account.

 

WebMailer Pro does not require any programming knowledge other than an understanding of basic HTML to quickly implement form generation and processing on a Web site. WebMailer Pro supports queuing of failed messages and customization of all e-mail and Web pages displayed after the form has been submitted.

 

WebMailer Pro has the following key features:

 

 

2.2 How does WebMailer Pro Work?

WebMailer Pro is a Common Gateway Interface (CGI) application that runs on your Web server. Form data is sent to WebMailer Pro by the server software when the user submits the form, and WebMailer Pro returns any results to the web server, which displays them on the user’s browser.

 

Following is a more detailed general flow of WebMailer Pro operations.

 

1. Your user connects to your Web Server and retrieves an HTML Form via standard HTTP (Hypertext Transfer Protocol) or SSL (Secured Sockets Layer).

 

2. The user fills out and submits the form which appears in their browser.

 

3. The user then "submits" the filled in form to the web server by pressing the Submit button.

 

4. Your Web server calls WebMailer Pro to process the form data just submitted by the user.

 

5. If required fields exist in the form, the system can send the user a customizable Incomplete Form Page explaining which required fields they did not fill out.

 

6. WebMailer Pro can be set to automatically e-mail the form contents to whomever is specified (this can be the sales dept., webmaster, etc.):

 

7. WebMailer Pro can also e-mail a receipt to the user to acknowledge submission of data.

 

8. WebMailer Pro returns immediate results to the user’s browser.

 

 

3. Installing WebMailer Pro

 

3.1 System Requirements

WebMailer Pro requires a Web server running on Windows 95 or NT 4.0 on the Intel platform. This product has not yet been tested for compatibility with FX!32 translation software on the Alpha platform.

 

 

3.2 Running SETUP.EXE Installation Program

 

Disk installation

  1. Insert the diskette into the disk drive.
  2. From the Start Menu, choose Run…
  3. In the Run dialog box, type A:\SETUP.EXE and then click OK. If A: is not your floppy drive, then replace A: with the appropriate drive letter.
  4. The installation program will ask if you want to unarchive WebMailer Pro, display the license agreement, and then guide you through the installation procedure.

 

 

3.3 Choosing a Directory for Executable/Documentation

The installation program will ask you to choose a directory for the executable and documentation. The installation program will always create a directory named WMPRO in the directory you have selected. This is where the program itself (WMPRO.EXE), configuration file, and template files will be installed.

 

 

3.4 Choosing a Directory for Sample HTML forms

You will need to select a directory for the included sample forms. The installation program will always create a directory named SAMPLES in the directory you have selected.

 

You should choose a directory in your DOCS or WWWROOT tree, or other directory in which HTML pages are accessible through the web server. Do not install the samples in a CGI-BIN or Scripts directory as you cannot typically access HTML files from these directories.

 

 

3.5 Installing on Netscape Commerce/Enterprise Server

For Netscape servers, you will need to ensure that CGI has been activated as a type on the server, or you will need to add the WMPRO directory to the list of CGI-BIN directories. This is done through the web server administration program.

 

If you do not activate CGI as a type, then you must add the WMPRO directory to the CGI-BIN directories list because otherwise WebMailer Pro will not be recognized as a CGI by Netscape and will not run.

 

Activating CGI as a type means that any .EXE file in any accessible directory is assumed to be a CGI. If you do this, then you will not need to add the WMPRO directory to the CGI-BIN directories list.

 

However, we recommend that you add the WMPRO directory to the CGI-BIN directories list, in any case, and name the URL prefix "/WMPro". This will make it easier to use the included samples, as they refer to this directory. Otherwise, you will need to modify the samples to the correct URL for WMPRO.EXE.

 

 

3.6 Installing on Microsoft IIS or PWS Web Servers

The following apply to Microsoft Internet Information Server for Windows NT Server, Microsoft Peer Web Services for Windows NT Workstation, and Microsoft Peer Web Server for Windows 95.

 

You will need to create a virtual directory that points to the WMPRO directory. If you are using IIS, this is done from the Internet Service Manager Manager, in the Directories Tab of the Web Service Properties. If you are using PWS, run the Internet Services Administrator, and select the Directories Tab under the WWW Services page.

 

We recommend that you call this virtual directory /WMPro for compatibility with the included sample forms. Be sure to grant this virtual directory Execute permissions from within the web server administration program.

 

Note that if even your WMPRO directory is located in your /Scripts directory, you will still need to create a virtual directory specifically for the WMPRO directory. This is due to behavior by IIS and PWS that reports to WebMailer Pro that the current directory

is the /Scripts directory, instead of /Scripts/WMPro.

 

Because WebMailer Pro looks for the configuration file in the current directory, the current directory reported must be the WMPRO directory. Therefore it is always necessary, in any case, to create a virtual directory specifically for the WMPRO directory.

 

 

3.7 Installing on Other Server Software

In general, make sure that WebMailer Pro is installed in a directory from which the web server allows executables to be run. How this is accomplished will vary on your web server.

 

 

3.8 Installing on a Remote Web Server

If you use the services of an Internet Service Provider (ISP) for your web site, then you will need to consult with your ISP for instructions on how they accommodate their users’ CGI programs. How you upload the WebMailer Pro files will also depend on the ISP; usually you will need to use FTP (File Transfer Protocol) to upload HTML files and CGI programs.

 

You will need to upload WMPRO.EXE and WEBMLR.INI (these files that are created in the WMPRO directory during local installation) to the location your ISP provides for your CGI programs. Depending on your ISP, this may be a central CGI-BIN or Scripts directory where all users’ CGI programs are stored, or it may be a local CGI-BIN or Scripts directory in the directory designated as the home directory for your site.

 

In any case, you will also need to replicate the entire GEOCEL directory structure and files that were created at installation underneath the WMPRO directory. This is necessary WebMailer Pro expects template files to be found in GEOCEL\TEMPLATES beneath the directory where WMPRO.EXE is located.

 

 

4. Using WebMailer Pro

 

4.1 An Overview of Forms

Using WebMailer Pro with HTML forms is very easy. Using your favorite HTML editor, create a form as you normally would. The form's action value will need to be set to reflect the directory where the program was installed. For example, the form header might be:

<FORM METHOD="POST" ACTION="/WMPro/WMPro.exe">

</FORM>

Each of the settings in the previous section can then be included in most cases using the "HIDDEN" HTML input type. The obvious exceptions would be the fields for the visitor's email address as well as the credit card fields which would be specified as the "TEXT" input type in this case.

 

Please refer to an HTML reference guide for more information about creating forms.

 

 

4.2 WebMailer Pro Form Variables

WebMailer Pro uses the contents of the actual form along with default settings from the WEBMLR.INI initialization file (please refer to Appendix B for a description of the entries in this file) to determine which actions to perform once the user has submitted the form. To pass parameters to the program through a form, you will need to specify a 'NAME' and 'VALUE' for each form object. For example, to save a person's name you would use the following tag inside the '<FORM>' tags of your form.

 

<INPUT TYPE="TEXT" NAME="Last_Name" VALUE="">

<INPUT TYPE="HIDDEN" NAME="RECIPIENT" VALUE= "webmaster@abc.com">

 

Once the user submits the form, WebMailer Pro will return the value of the 'Last_Name' variable in an e-mail message to webmaster@abc.com.

 

WebMailer Pro reserves certain values to control form processing. By specifying the value of these variables, you can customize the behavior and output of the program. Most of these variables may be specified as the 'HIDDEN' input type . Many of the variables can also be used to retrieve information from the user within the form. In this case, the input type should be specified as "TEXT" For example:

 

To set the receipt's subject field yourself so that it is always the same, you could use the following tag within the form:

 

<INPUT TYPE="HIDDEN" NAME="RECEIPT_SUBJECT" VALUE="Your receipt">

 

 

 

 

To allow the user to enter this information, so that they can set the subject of the message which they will receive, the following tag should be used within the form:

 

<INPUT TYPE="TEXT" NAME="SUBJECT" VALUE="">

 

Notice the difference in the input type.

 

The following is a list of keywords that the program will recognize:

 

Variable Description

Basic Keywords

DISABLE_EMAIL Informs the program that no e-mail messages should

be generated for this form.

 

EMAIL Sets the e-mail address to which the receipt will be

delivered, as well as the address which will appear in the

"From:" field of the notification message which is sent to

the user specified in 'RECIPIENT' (See below).

 

RECIPIENT (required) Sets the e-mail address to which the notification message is to be delivered.

 

REQUIRED A list of the required fields to be filled out in the form.

The names in the list must match the 'NAME' values in the

form. If the user submits the form without the required fields, then he/she is informed that the entry is incomplete and the fields are missing. A list of unfilled required fields can be generated and presented to the user through the use of templates (see below).

 

SUBJECT Sets the text which will appear in the "Subject:" field of the notification message

Output Page Keywords

BGIMAGE Sets the background image of the output page created on

the fly by the program (if 'REDIRECT' is not specified) or of any error pages sent to the user's browser.

 

BGCOLOR Sets the background color of the output page created on

the fly by the program (if 'REDIRECT' is not specified) or of any error pages sent to the user's browser.

 

 

LINKBACK Creates a link at the bottom of the output page created on

the fly by the program (if 'REDIRECT' is not specified) or of

any error pages. This is the URL of the page that is linked

back to.

 

LINKBACKTEXT If 'LINKBACK' is specified, this text is displayed with

the link. If 'LINKBACKTEXT' is NOT specified, the

default text "Back to site" will be used.

 

REDIRECT Sets the absolute URL to which to redirect the user's

browser after the program has finished processing the form.

 

REDIR_MISSING Sets the absolute URL to which to redirect the user's

browser after the program has determined the user has

not filled in all of the fields set in the 'REQUIRED' field.

 

SORTORDER Specifies which values from the form that you want to appear in the notification message sent to the user specified in 'RECIPIENT' as well as the order of those values. If the sort order is not specified, then the form values are returned in random order.

 

TEXTCOLOR Sets the text color of the output page created on the fly by

the program (if 'REDIRECT' is not specified) or of any error pages.

 

Receipt Keywords

DO_RECEIPT Return an e-mail receipt to the user who filled out the HTML form. The message is sent to the address specified in the 'EMAIL' field. If no template is specified using 'TEMPLATE_RECEIPT' it returns the form values sorted by the value in 'SORTORDER' if specified, or unsorted (random order).

 

RECEIPT_SUBJECT Sets the "Subject:" line of the e-mail receipt.

 

RECEIPT_FROM Sets the "From:" line of the e-mail receipt.

 

Template Keywords

 

TEMPLATE_MAIL Specifies the template to use for the e-mail message to

be delivered to the address specified in the 'RECIPIENT' field.

 

TEMPLATE_MISSING Specifies the name of a template to use for the web page returned to the user's browser after the program has determined that the user has not filled in all of the fields set in the 'REQUIRED' field. This template can include conditional statements to list the actual missing fields.

 

TEMPLATE_RECEIPT Specifies the name of a template to use for the e-mail

message the user receives after successful completion of processing.

 

TEMPLATE_WEB Specifies the name of a template to use for the web page

returned to the user's browser.

 

 

4.3 Simple Form Sample

The only required fields for WebMailer Pro to e-mail a simple form are the 'RECIPIENT' and 'EMAIL' fields. If the 'RECIPIENT' is not specified, then the default address that was set during installation is used.

 

Note the difference between 'EMAIL' and "RECIPIENT': 'EMAIL' specifies the e-mail address of the end user who filled out the form. 'RECIPIENT' specifies the e-mail address to which all form results are sent; this is usually the address of the webmaster or other person who is collecting that particular form’s data.

 

Other fields may be included in the form depending upon the overall functionality you wish to incorporate into your site. Using just the basic variables, a simple guest book can be created. An example guest book is included with the installation to demonstrate the use of basic form settings. This example form was installed into a directory you chose for sample files during installation. To use the form, open the file with any text or HTML editor and change the recipient field to your e-mail address. Each of the redirect fields will need to be modified as well to reflect the path on your web server where the samples were installed.

 

The form asks for the name, e-mail, and comments of the guest. Required fields are the name and e-mail. Upon success, the guest's browser is redirected to a thank you page. After modifying the RECIPIENT to contain your e-mail address, open a browser and type the following on the address line

http://<your domain name>/<path>/Guestbk.htm

 

to try out the form. This example also illustrates the use of redirects to the user's browser and the fields that are required. Experiment and make changes to the hidden form values to observe their changes on the form processing and output. Try out different options with this form until you feel comfortable passing values and settings to the program.

 

 

5. Templates

 

5.1 What are Templates?

A template is a file that WebMailer Pro uses to build custom e-mail and web pages from the data that the user submits in the form. These pages can be used to provide customized responses to form input. Templates are stored in a subdirectory named GEOCEL\TEMPLATES beneath the directory where the executable file is located. If you wish to specify another directory as the root directory for templates, refer to Appendix B for making this change in the WEBMLR.INI file.

 

 

5.2 Special Characters used in Templates

WebMailer Pro uses a very simple template language that reserves a few special characters to signify form and environment values.

 

% (percent sign)

The percent sign is used to replace HTML Form variables (INPUT fields) with the text or number that they represent.

 

Syntax: %variable_name%

Sample: %name%

Output: John Doe

 

^ (carat or power sign)

The carat sign is used to enclose HTTP Session and System Environment Variables with the information that they represent. For a listing of all the available environment variables, please refer to Appendix C.

 

Syntax: ^variable_name^

Sample: ^REMOTE_HOST^

^PATH^

Output: ppp207.ppp.isp.net

C:\WINNT;C:\WINNT\SYSTEM32;C:\MSSQL\BINN;

 

; (semicolon)

The semicolon is used to denote a comment in a template file. Text after a semi-colon will be ignored by the program until the end of a line is reached.

 

Syntax: ;comment

Sample: This is a ; test

Output: This is a

 

* (asterisk)

The asterisk is used to indicate that a file should be attached at the end of the message. Useful only in e-mail templates, you can specify that a certain file be

attached to any message.

 

Syntax: *<file path>*

Sample: *c:\products\gadget.exe*

Output: Mime attachment to the message.

 

 

+( plus sign )

The plus sign is used to include the contents of another template in the current file.

 

Syntax: + <Template file name> +

Sample: + header_template.txt +

Output: The contents of the header_template.txt file.

 

 

Displaying Reserved Characters as Text

In order to display any of the reserved characters as actual text to display, "escape" them with a '\' (backslash) character as is done C and Perl.:

 

Syntax: \special character

Sample: x \+ y

Output: x + y

 

NOTE: If the '+' sign in the above sample is placed in the template WITHOUT the backslash, the system will assume the special use of the '+', and an error will occur.

 

 

5.3 Creating Templates

Creating templates can be accomplished using any standard text editor such as Notepad. After the template is created, it needs to be saved in the templates directory; unless you have specified a different directory by modifying the WEBMLR.INI file (see Appendix B), this is the subdirectory GEOCEL\TEMPLATES below the directory where the WebMailer Pro executable file is located. Any file extension can be used as long as the file name specified in the HTML form matches the name of the template.

 

5.4 Using Templates

In order to use the new template, you will need to pass the name of the template file to WebMailer Pro through a hidden input type form field within an HTML form. WebMailer Pro will parse the template file substituting form values for variables and return the complete page. Examples of each type of template follow:

 

 

5.4.1 E-Mail Templates

E-Mail Templates can be used for the return receipts sent to users that fill out your form or to the recipients of the e-mail message. For example, a simple form for a feedback page would be:

.....

<FORM ACTION="/WMPro/WMPro.EXE" METHOD=POST>

First Name: <INPUT TYPE="TEXT" NAME="First_Name"> <BR>

Last Name: <INPUT TYPE="TEXT" NAME="Last_Name"> <BR>

E-mail: <INPUT TYPE="TEXT" NAME="EMAIL"> <BR>

Comments: <TEXTAREA COLS=60 NAME="Comments" WRAP=SOFT> </TEXTAREA>

<INPUT TYPE="HIDDEN" NAME="RECIPIENT" VALUE="mikey@life.com">

<INPUT TYPE="HIDDEN" NAME="TEMPLATE_MAIL" VALUE="email.txt">

<INPUT TYPE=SUBMIT>

</FORM>

......

If the user submits:

 

First_Name = "John"

Last_Name = "Doe"

Email = "johnd@anon.com"

Comments = "I really like your site!!"

 

And the template "email.txt" is:

 

....

Mike, this is your web server talking to you…

 

%First_Name% %Last_Name% from ^REMOTE_HOST^ visited the site.

 

Comments:

%Comments%

 

He or she can be reached at %Email%.

 

Have a nice day!

....

 

Then the form values would be translated to an e-mail message similar to this:

 

Mike, this is your web server talking to you…

 

John Doe from ppp207.ppp.isp.net visited the site.

Comments:

I really like your site!!

 

He or she can be reached at johnd@anon.com

 

Have a nice day!

 

Creating e-mail Receipts for visitors is very easy as well. First, you will need to include a hidden form field specifying that you wish to return a receipt. Then you will need to setup the name of a template to use for the receipt as shown below:

<INPUT TYPE="HIDDEN" NAME= "DO_RECEIPT" VALUE="On">

<INPUT TYPE="HIDDEN" NAME= "RECEIPT_SUBJECT" VALUE="Thank you">

<INPUT TYPE="HIDDEN" NAME= "RECEIPT_FROM" VALUE="mikey@life.com">

<INPUT TYPE="HIDDEN" NAME= "TEMPLATE_RECEIPT" VALUE="receipt.txt">

 

A formatted receipt will then be sent to the visitor using the receipt.txt file. Any template file specified in the form must reside in the templates directory.

 

 

5.4.2 Web Templates

Web templates are basically the same as e-mail templates except that the template file includes HTML formatting codes in addition to the control characters. The control characters do not conflict with HTML so you can preview the layout of the file with any browser. First, specify the values in the form as follows:

 

<INPUT TYPE="HIDDEN" NAME= "DO_RECEIPT" VALUE="On">

<INPUT TYPE="HIDDEN" NAME= "RECEIPT_SUBJECT" VALUE="Thank you">

<INPUT TYPE="HIDDEN" NAME= "RECEIPT_FROM" VALUE="mikey@life.com">

<INPUT TYPE="HIDDEN" NAME= "TEMPLATE_WEB" VALUE="response.htm">

 

If the user submits:

 

First_Name = "John"

Last_Name = "Doe"

Email = "johnd@anon.com"

Comments = "I really like your site!!"

 

and the template "response.htm" is:

 

<HTML>

<HEAD><TITLE>Thanks for visiting!</TITLE></HEAD>

<BODY>

<P>

Thank you, <B>%First_Name% %Last_Name%</B> for your input. Your comments are important to us.<BR>

<BR>

A follow-up e-mail has been sent to you at %email%.

<BR>

<P>

Sincerely,<BR>

Mike Smith

</BODY>

</HTML>

 

Then the user would see the following displayed in their web browser:

 

Thank you, John Doe for your input. Your comments are important to us.

A follow-up e-mail has been sent to you at johnd@anon.com.

 

Sincerely,

Mike Smith

 

If visitors fail to fill in all of the required form fields, a web template can be used for this page. A hidden field will need to be added setting the "TEMPLATE_MISSING" to the name of the template.

 

 

5.5 Advanced Template Language

Currently, WebMailer Pro's Template Language supports one advanced feature: conditional expressions. Using conditional expressions, you can tailor the response that is returned based on the user's input. WebMailer Pro supports the following types of conditional expressions:

 

A = B A equal to B

A <> B A not equal to B

A > B A greater than B

A < B A less than B

 

To use a conditional expression in WebMailer Pro, insert a conditional block in the appropriate template file as follows:

 

[ <conditional expression> ]

{ <expression(s) to display if the condition is met> }

 

Conditional blocks can be nested.. The statements inside of a conditional block behave the same as expressions outside the block. Variables inside of the square brackets for the conditional expression should not be delimited by '%' signs.

 

Lets take an example to illustrate the use of conditionals:

 

On your Web Site, you sell mailing lists. When a user on your site decides they want to purchase a mailing list from you, you can offer several means of delivery. So, in this example, you're offering delivery via e-mail, fax, or U.S. Postal mail. Depending upon which type of delivery the person chooses, you want to provide them with a customized receipt. The relevant form values for this example would be:

<SELECT NAME="delivery_type" SIZE=1>

<OPTION VALUE="email"> E-mail

<OPTION VALUE="fax"> Fax

<OPTION VALUE="postal"> Regular Mail

</SELECT>

<INPUT TYPE="HIDDEN" NAME="DO_RECEIPT" VALUE="On">

<INPUT TYPE="HIDDEN" NAME="RECEIPT_SUBJECT" VALUE="Thank you">

<INPUT TYPE="HIDDEN" NAME="RECEIPT_FROM" VALUE="joes@abc.com">

<INPUT TYPE="HIDDEN" NAME="TEMPLATE_RECEIPT" VALUE="receipt.txt">

The following segment of template code could be used in the e-mail receipt template:

 

Thank you for your interest in our Mailing Lists. The mailing list you purchased will be delivered within 5 working days to:

 

[ delivery_type = "email" ] { %email% } ; chose email

[ delivery_type = "fax" ] { %fax_number% } ; chose fax

[ delivery_type = "postal" ] ; chose USPS

{

%name%

%address%

%city%, %state% %zip%

}

 

Note that form variable names are not enclosed with '%' characters inside of the conditional square brackets. If the condition inside the square brackets ([]) is not met then no text will be output.

 

For example, if the visitor chooses regular US Postal mail as the delivery type, then the output would be:

 

Thank you for your interest in our Mailing Lists. The mailing list you purchased will be delivered within 5 working days to:

 

Bill E. Simms

2 Elm St.

Due West, SC 32083

 

 

6. Technical Support

 

6.1 Common Problems (Quick Tips)

 

When testing CGI programs (such as WebMailer Pro), you must actually be accessing your files through a Web Server.

This is because CGI (Common Gateway Interface) is an interface between a Web Server and a separate program (e.g., WebMailer Pro). Without having a Web Server involved, strange things will happen in your browser. To determine if you are browsing over a Web Server, look at your Address line. It should begin with http://address… or https://address…. It should not begin with a drive letter or file://….

 

The directory WebMailer Pro is in must have Execute access.

WebMailer Pro is usually installed into the CGI-BIN or Scripts directory of your Web Server. If you choose to place it elsewhere, you will need to make sure that directory has Execute access on your Web Server. You can check this on the Directory tab on IIS or the Content Management section of the Netscape Administration Server.

 

Control characters in templates must match up in pairs.

In templates, if control characters are not in matched pairs (except for the comment character) , then the template will not output correctly. To use any of the control characters in a template without a matching terminating character, you will need to escape the character. For example, the following tag would cause an error:

 

<BODY BGCOLOR="#FFFFFF">

 

To correctly display the tag, 'escape' the pound sign.

 

<BODY BGCOLOR="\#FFFFFF">

 

 

6.2 Contacting GeoCel International

If you have any questions about this program, you can receive free support via email at:

 

support@geocel.com

 

Technical support questions are usually answered within 24 hours. Please be specific and include web server and version, and all relevant code (HTML pages, templates). Support can also be obtained over the web at:

 

http://www.geocel.com/techform.html

 

If the problem cannot be resolved via email, you may contact technical support at

(512) 485-7550.

 

Thank you for purchasing WebMailer Pro.

 

 

 

Appendix A: Glossary of Terms

 

CGI: Common Gateway Interface. This interface allows a web server to communicate with an executable program running on the same computer. Typically, it is used to pass information for further processing and delivery, and to accept information for display in the user's web browser.

 

CGI-BIN: This is the directory in which all CGI executables typically reside. The directory is created when you install your web server, and may be called by another name.

 

E-mail: Electronic Mail. A standard allowing users on various computers connected to a network to send messages to each other. Some implementations of e-mail allow for attachments to send images, or other non-plain text files.

 

HTML: HyperText Markup Language. This is the "language" of the World Wide Web used to compose web pages allowing for navigation (i.e., links), limited layout control and font control, image integration, as well as other more advanced functions.

 

HTTP: HyperText Transfer Protocol. A standard network communications protocol web servers and web browsers to use "talk" to each other.

 

Internet: A huge network connecting computers all over the world allowing them to communicate with each other. E-mail and the World Wide Web are just two of the many services that use the Internet as their transportation medium.

 

URL: Universal Resource Locator. This is a generic term for any item that can be retrieved over the Internet. It can be a World Wide Web page, and FTP file archive, a newsgroup, a gopher database page, etc.

 

Variables: These are "place holders" used in programs or templates. They can be used to hold values that can be assigned at any time, and then displayed as the user desires.

 

Web Browser: A program that acts as a client to a web server. It is the "Window" into the World Wide Web. It requests pages from a web server using the HTTP protocol.

 

Web Server: A program that communicates with a web browser, and "serves" pages requested of it over the Internet using the HTTP protocol to web browsers requesting those pages.

 

World Wide Web: The combination of web servers and web browsers running over the Internet.

 

 

 

Appendix B: WEBMLR.INI File

 

The program uses a small initialization file to store constant values that will be needed every time the program is called. This file is named WEBMLR.INI and is located in the same directory where the executable is located. To modify any settings, open the file with a text editor and make any necessary changes. A sample configuration after a typical installation is below:

 

 

[WebMailer]

SMTP=mail.geocel.com

DefaultRecipient=webmaster@geocel.com

Referers=www.geocel.com,www.altonline.com

 

 

Variables

 

SMTP

Default: Installation Option

Usage: Required

Description:

Specifies the hostname of the SMTP Mail Server. This is a Setup option, and only needs to be modified if the name of the server changes, or if it is necessary to use a different mail server.

 

Referers

Default: Not Added to INI

Usage: Highly Recommended

Description:

Specifies which web sites can point to your WebMailer Pro executable. Typically, you will put only your site’s address (e.g., www.mydomain.com) in this string; this prevents unauthorized users from using your site to process forms without your permission. You can grant multiple web sites permission by specifying multiple referers in this string, as in the example .INI file above.

 

Note: If you do not have a Referers string, then all accesses from any sites are allowed.

 

DefaultRecipient

Default: Installation Option

Usage: Recommended

Description:

Sets the default e-mail address for form processing. If this value is present, then the 'RECIPIENT' field will not have to be specified in the form.

 

TEMPLATE_DIR

Default: Not added by installation

Usage: Not Recommended

Description:

Specifies the directory that WebMailer Pro looks for templates. Before changing this, have a good understanding of Windows NT file permissions; the User Context that the server is running under must have read access to this directory. Unless this setting is present, WebMailer Pro will assume templates are in a subdirectory GEOCEL\TEMPLATES beneath the directory where the executable is located.

 

 

TEMP

Default: Not added by installation

Usage: Not Recommended

Description:

Specifies the directory that WebMailer Pro uses to create any temporary files needed for processing. By default, WebMailer Pro will create temporary files in the directory where the program itself, WMPRO.EXE, exists. If you need to change this for any reason, set this variable to another directory that has unrestricted write access.

 

 

Appendix C:

Form Variables Available in CGI Environment

 

HTTP_AUTHORIZATION IIS 1.0 ONLY :Returns the type of authorization used.

AUTH_TYPE IIS 2.0 ONLY : Returns the type of authorization used.

HTTP_CONNECTION Returns the type of connection established

CONTENT_LENGTH Returns the number of bytes expected from the client

CONTENT_TYPE Returns the content type from the body of a POST request.

GATEWAY_INTERFACE Returns CGI specifications the server uses.

HTTP_ACCEPT Returns special-case header values

LOGON_USER IIS 2.0 ONLY : Returns Windows NT account

PATH_INFO Returns trailing part of the URL after the script name.

PATH_TRANSLATED Returns full path of script name.

HTTP_PRAGMA ONLY in IIS 2.0

 

QUERY_STRING Returns query string.

 

HTTP_REFERER Returns the URL of the requesting HTM.

REMOTE_ADDR Returns the clients IP address.

REMOTE_HOST Returns the client hostname

REMOTE_USER Returns the authenticated client name.

 

REQUEST_METHOD Returns the HTTP request method

 

SCRIPT_NAME Returns the name of the script program being executed

SERVER_NAME Returns the servers hostname or IP address.

SERVER_PORT Returns the TCP/IP port used.

SERVER_PROTOCOL Returns name and version of information retrieving protocol

SERVER_SOFTWARE Returns the name and version of the Web Server Software

HTTP_USER_AGENT Returns the name of the browser.