btn_bar_y.gif (754 bytes)

 


Prime Choice
Using FormMail

FormMail

Defined:

Formmail is a combination of an html document with a form and a "CGI" program that mails the contents of the form to a user

Prime Choice's formmail program is written in "C". The contents of the form can be "dump" to you via email or formated the way you like. Formating takes place by optionally providing a "format" docuemt that lays out the fields you wish to get via email.

Demonstration:

How To:

You'll want to get a few Prime Choice. Then follow these instructions. In the end, YOU have to design and build you formmail document the way you want it!

  1. Build a submission form. . Each aspect of the form is detailed below, to better understand what you are doing, please view the source of the the Prime Choice obtain the aforementioned documents and print them for reference.

    • FORM Action:

      <form action="http://www.yourdomain.com/cgi-bin/formmail"
      method="POST">

    • REQUIRED FIELD email_to:
      "email_to" Use this field if you want entries e-mailed somewhere. . Contains the e-mail address where you want the e-mail to go!

      EXAMPLE:
      <input type="hidden" name="email_to"
      value="formmail@yourdomain.com">

    • OPTIONAL FIELD email_format:
      This optional field is used if you wish to supply a special format file. The script will use this file to format your e-mail. "email_format" This field tells where the e-mail format file is located

      /web/guide/yourdomain.com/yourdoc.fmt



      EXAMPLE:
      <input type="hidden" name="email_format"
      value="/opt/web/guide/yourdomain.com/formmail.fmt">

    • OPTIONAL FIELD email_subject:
      "email_subject" This fields specifies the subject of the email that is sent!

      EXAMPLE:
      <input type="hidden" name="email_subject"
      value="Order Submitted">

    • OPTIONAL FIELD email_from:
      "email_from" . This fields specifies the users e-mail id. Remember they could be lying!

      EXAMPLE:
      <input type="text" size="30" name="email_from">

    • OPTIONAL FIELD url_redirect:
      "url_redirect" This field tells where to take the user after the email is submitted. Generally this will be a thankyou html document

      http://www.yourdomain.com/yourdoc.htm

      EXAMPLE:
      <input type="hidden" name="url_redirect"
      value="http://www.yourdomain.com/formthankyou.htm">

    • OPTIONAL FIELD required_fields:
      "required_fields" This field enforces the certian fields are filled in by the user
      EXAMPLE:
      <input type="hidden" name="required_fields"
      value="name,comments">

  2. Create a e-mail format file! This is the file that specifies which fields mailed back and how they are formatted. NOTE: This step is only required if you include an email_format field as described above.

    • FIELD NAME SPECIFICATION:
      Field names are specified by using the exact field names as are in the submission form with preceding and trailing "@" sign. NO SPACES!

    • EXAMPLE of the Prime Choice Guest Book Format File!
      Name: @name@
      Comments: @comments@

 

Home Page | About Us | Order Forms | Customer Support
FAQ | Other Services | Contact PrimeChoice

Copyright © 1997 Prime Choice Web Hosting All Rights Reserved