Email template guidelines by gigi12


									Email template guidelines


         Template should be in the format
             <blank line>
         User supplied information should be placed as the form field name inside brackets. [fieldname]
          The names must be identical to the fields on the HTML form and cannot have spaces.
         Must be saved as a plain text file


         Lines should be in the format: command: data
         The command must be followed by a colon
         Must not have any blank lines between header lines
         Must be followed with a blank line before the body of the message
         Cannot contain HTML code
         May contain form variables enclosed in brackets
         Must have only one command per line
         Can include any of the following (not case sensitive). Any other header lines will be ignored.
              o To: (email address(s))
              o From: (sender email address)
              o Sender: (sender name)
              o ReplyTo: (email address to reply to if different from the From address)
              o CC: (email address(s))
              o BCC: (email address(s))
              o Subject: (text)
              o Priority: (An Integer that sets the priority of the email: 5 = Highest, 4 = High, 3 = Normal,
                  2 = Low, 1 = Lowest. 3 is the default priority.)
         The To:, CC: and BCC: headers can have multiple email addresses, separated by commas,
          spaces or semicolons
         The To: field is required


         The body follows a blank line after the header. At least one header line (the To: field) is required
          for an email to be sent.
         HTML can be included in the body of the email. Any text in tag format (<>) will be interpreted as
          an HTML tag.
         Each line of text in the form will have a line break afterwards, regardless of length.
HTML Form Guidelines

Must be saved as a .htm or .html file

Required fields
    Form tag with appropriate action value
    Hidden input field with location of template


<input type="hidden" name="path" value="/servername/email/exreq.txt">

NOTE: Your path will be different.

Optional enhancements
     Add text to the success page.
        When mail is sent, a page titled ``Success'' appears with the text of the e-mail message. You may
        use a hidden variable called ``addendum'' to add your own text. Here is a simple example:
        <INPUT TYPE="hidden" NAME="addendum" VALUE="Thank you!">
     Use an alternate success page
        If you don't like the default page that comes up when email is successfully sent, you can specify
        an alternate URL using a hidden variable called ``success'' in your HTML form, e.g.
        <INPUT TYPE="hidden" NAME="success" VALUE="">
        Note: Start your URL with / or with http://.

       Make some inputs required.
        If you would like to automatically reject forms with certain inputs left blank, add the prefix
        ``required-'' to the name of the input in both your HTML form and your e-mail template. Here is an
        In the HTML form:
        Your name: <INPUT NAME="required-yourname">
        In the e-mail template
        Your name:        [required-yourname]

Note: This product is based on cgiemail. Additional examples can be found here. Some options offered
by cgiemail, such as specifying format for the inputs and use of CGI environment variables, are not

To top