Search billions of records on Ancestry.com
   

The MailMerge CGI script has been installed on the FreePages server and is available to webmasters. This script will allow you to put forms on your web pages and have the results of the form sent to you in an e-mail message. You also have the option of having the data from the form posted to a web page so that it can be viewed immediately. This gives you the ability to build a feedback form, guestbook, or the like.

Basic documentation on how to use MailMerge is available in the RootsWeb Wizards pages at http://www.rootsweb.com/rootsweb/wizards/basicmm.html. Detailed documentation is provided at http://www.rootsweb.com/rootsweb/wizards/mailmerge.html

When using MailMerge on FreePages, there are some differences in how you will code your PathName in your <form> tag and in your template file.

Only a relative path will work in your <form> tag. Here's an example of the <form> tag in one of the samples:

<form action="/cgi-bin/mailmerge.cgi/~elsi/maillist.tmp"
method="POST" enctype="application/x-www-form-urlencoded">

Using the relative path of  ~elsi, this form will work within any of your community directories on the FreePages server. You could put the form in your genealogy_html directory or in your arts_html directory along with its template file and the form would work without any changes.

Here are examples for using MailMerge forms:

  • The Input Form

    The input form for both our examples is identical except for the template file referenced in the <form> tag.

    <form action="/cgi-bin/mailmerge.cgi/~elsi/template.tmp"
    method="POST" enctype="application/x-www-form-urlencoded">

    <INPUT TYPE=hidden NAME="mgr_name" value="Leigh Compton">
    <INPUT TYPE=hidden NAME="mgr_email" value="elsi@augustmail.com">

    <fieldset>
    <legend>About You</legend>
    <table border="0" cellpadding="0" cellspacing="0">
       <tr>
          <td>Your Name:</td>
          <td><input type="text" size="35" maxlength="50" name="Name"<>/td>
       </tr>
       <tr>
          <td>E-Mail Address:</td>
          <td><input type="text" size="48" maxlength="75" name="EMail"></td>
       </tr>
       <tr>
          <td>Home Page URL:&nbsp;&nbsp;</td>
          <td><input type="text" size="48" maxlength="75" name="URL"></td>
       </tr>
       <tr>
          <td>&nbsp;</td><td>(Optional)</td>
       </tr>
    </table>
    </fieldset>

    <fieldset>
    <legend>Your Opinion</legend>
    <p><textarea name="Comment" rows="12" cols="60"></textarea></p>
    </fieldset>

    <p><input type="submit" value="Submit Comment">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="reset" value="Clear Form & Start Over"></p>
    </form>

     

  • Sending e-mail

    You can View or test the input form

    The template for this form (maillist.tmp) contains a simple set of directives for building an e-mail message from the data collected in the form:

    # template: maillist.tmp
    # This example uses a "Mail" action to send the output form
    # to the webmaster via e-mail

    ACTION=mail

    MULTIVALUE_FORMAT=BRACES
    ESCAPE_HTML=0
    SUBJECT=Feedback and Comment

    #################################################################

    WORDWRAP=72
    TITLE=Your message request has been sent!!<br><br>**DO NOT** Hit the "Back" Button on your Browser unless you would like to send another comment.<br> <br> <a href="http://freepages.computers.rootsweb.com/~elsi/">Return</a> to the main page.
    AUTHOR=Leigh Compton
    ADDRESS=<A HREF="http://freepages.computers.rootsweb.com/~elsi/">RETURN to the Main Page</A>
    .

    # This is the e-mail header.

    MAIL_HEADER=
    #To: @mgr_email@
    To: elsi@augustmail.com
    From: @EMail@
    Reply-to: @EMail@
    Subject: @SUBJECT@
    X-mail-agent: mailmerge v1.0
    X-form-location: @REFERER@
    .

    # The output form that is sent via e-mail

    OUTPUT_FORM=

    @Name@, <@EMail@>
    @DATE@
    @Comment@
    @URL@
    .

     

  • Posting to a web page

    You can View or test this form, and then View the resulting output.

    The template for this form (query.tmp) contains a simple set of directives for creating a "guestbook" message from the data collected in the form:

    # template: query.tmp

    # This example uses a "File:" action to append the output form
    # to a file. This can be used to create a simple Guestbook.

    # This is the file that the entry gets appended to.

    ACTION=File: /u1/e/l/s/i/elsi/computers_html/newquery.html

    # Since we're writing out a file to be viewed as HTML, we
    # set ESCAPE_HTML to true in order to prevent users from
    # entering incorrect codes that will mess up the formatting.

    ESCAPE_HTML=1
    .

    # The output form that is written to the file.

    OUTPUT_FORM=

    <p><strong>@Name@, &lt;@EMail@&gt;,
    @DATE@</strong><br>
    @Comment@<br>
    &nbsp;&nbsp; <a href="@URL@">@URL@</a>
    <!-- Referer=@REFERER@, User=@REMOTE_USER@, Host=@REMOTE_HOST@ --> </p>
    .

     

    When you want to write to a file as in the above example, your template must use an absolute pathname to your output file. (This is the opposite of your input form which must use a relative pathname.) Due to the directory structure on the FreePages server, you cannot use a relative or URL-format pathname as described in the MailMerge documentation.

    The absolute pathname for your file is formed from the first four characters of your userid/account name. For example, a file in the computers_html directory in account elsi, which is referenced as http://freepages.computers.rootsweb.com/~elsi/output.filename, has a pathname of

      /u1/e/l/s/i/elsi/computers_html/

    Likewise, a file in the arts_html directory of account linda, which is referenced as http://freepages.arts.rootsweb.com/~linda/output.filename, has a pathname of

      /u1/l/i/n/d/linda/arts_html/

If you have further questions about using MailMerge on the FreePages server, please post your question to the FreePages-Help mailing list. All those who were assigned web space on the FreePages server were automatically subscribed to the digest version of this list (FreePages-Help-D). If you have unsubscribed, you will need to subscribe again before you can post to the list. Information on subscribing can be found at http://freepages.rootsweb.com/help.html.