MailPost
How it works

  
How does MailPost work?

MailPost has an interface similar to the UNIX cgiemail program. MailPost uses template files that hold the basic structure of how an email message will look. Along with template files, MailPost uses HTML form variables. These variables, if they are defined in the template file, will be inserted into the email message where they appear. The basic operation is this:
  1. The web designer creates a template file (a flat text file) that contains the email header info, such as "To:" and "Subject:" fields. This template file also contains basic formatting of the email message that will be sent. When HTML form input element names are placed within brackets [] in the template file, MailPost replaces that part of the template with the value submitted for that element in the HTML form.
  2. The web designer then creates their HTML form, using the names of input elements that were used in the template file.
  3. The web designer may also make certain fields required. This is easily accomplished by preceding an input element name by "required-".
  4. The web designer then sets the HTML form's method to POST, and sets the action to the URL of the template file.
  

Here is an example of a template file:

From: mailpost@mcenter.com
To: mailpost@mcenter.com
Subject: test of MAILPOST v2.0

This is the text of my email message.

Name: [name]

Address:
[address]

Phone: [phone]

Email: [required-email]
  

In the above sample, the web designer has used 4 HTML form inputs in their form. They were named "required-email", "name", "address", and "phone". Since the designer chose to make "email" a required input (required-email), if the field is left blank when the user submits the form, MailPost will report to the user that required-email must be filled in.

  

So, if the following input element values where submitted by the HTML form:


name: John Smith
address: 1622 Anywhere Street Anywhere, CA 98765
phone: 825-555-1212
required-email: smith.john@my-email.com
  

The recipient of the email message would get a message that looks like:

From: mailpost@mcenter.com
To: mailpost@mcenter.com
Subject: test of MAILPOST v2.0

This is the text of my email message.

Name: John Smith

Address:
1622 Anywhere Street
Anywhere, CA 98765

Phone: 825-555-1212

Email: smith.john@my-email.com  
  

MailPost MailPost Homepage