The second file to create is the template fileThe template file defines the look and what data gathered from the input form you want to be sent to you as output. This can be sent either as an email message to you or sent to a webpage, like a guestbook for example.
The template file is a straight text file - so do not include any html header commands in the file.
The template file consists of several sections, each one terminated by a single period as the only character in a line by itself.
The first section sets up defaults and variables.
Variables defined here are similar to hidden variables transmitted from the form.Every template must have an OUTPUT_FORM section.
This describes the output to be placed into an e-mail message or written to a file.
When setting up a template for sending e-mail, you'll need to use the MAIL_HEADER section.You can place comments into the template by using a hash (#) as the first character in the line.
Let's now create a template that will send a submission made through the form (see previous section aboutForm and input file) to you by email.
# template: application.tmpACTION=mail
# Set up defaults
SUBJECT=Test HTMLHELP Mailmerge Application Form
TO=j.daamen@wxs.nl
WORDWRAP=72
TITLE=Your application has been sent.
AUTHOR=Jan Daamen
ADDRESS=<A HREF="http://htmlhelp.rootsweb.com/members/jan/mailmerge/">RETURN to Mini Tutorial on Mail Merge</a>
.# This is an e-mail header.
MAIL_HEADER=
To: @TO@
From: @Email@
Reply-to: @Email@
Subject: @SUBJECT@
X-mail-agent: mailmerge v1.0
.# The output form, ie. the email, that is sent.
OUTPUT_FORM=
@NAME@, < @Email@ > has submitted through the application form in the HTMLHELP Mini Tutorial
.
Let's now go to the FORM, fill it out and submit it!
To top of page