World Class Web Hosting
+1.877 724-7638

my pair account webmail

Web hosting services

 

  • pairNIC - domain name registration (as low as $13/year)
  • pairSIM - one-click software installation
  • pairCDN - content delivery network
  • pair reseller program - reselling our Web site hosting services
  • pair Networks does not offer "Business Associate" services under HIPAA

about pair Networks

 

Contact Us

pairNIC Support

blog.pair.com

Call Us

  • +1.877 724-7638
  • +1.412 381-7247

Fax

  • +1.412 381-9997

E-mail Us

Web contact forms

Mailing Address

  • pair Networks, Inc.
    Suite 210
    2403 Sidney Street
    Pittsburgh, PA 15203-2168

support - knowledge base

 

Authoring/Development - formmail.pl

formmail.pl is a Web form delivery script that can be used with any account level at pair Networks. We are using a special version of formmail.pl modified to protect against abuse by ensuring that the e-mail recipient is legitimate.

Any form fields included in the call to formmail.pl will be included in the e-mail that is sent. formmail.pl has many optional hidden fields, but only the recipient field, which determines where the e-mail is sent, is required.

formmail.pl accepts form submissions using the POST method. The line to pass the form input from your page to formmail.pl is:

<FORM METHOD="POST" ACTION="/cgi-sys/formmail.pl">

There are no modifications needed to this line in your code. You should not copy the formmail.pl file to your account cgi-bin unless you intend on customizing the source code of it. This is not needed for normal usage. The "cgi-sys" portion of the ACTION above directs the server to look into the server's cgi-bin so the formmail.pl script doesn't need to reside in your individual account.

For an example of a typical formmail Web form, click here. When viewing the page, right-click your mouse and "View Page Source" for the notes and HTML source code.

In the following example, only the recipient field is required.

This field specifies the destination e-mail address for the form contents. Example:

<INPUT TYPE="hidden" NAME="recipient" VALUE="address@example.com">

If you wish to have multiple recipient e-mail addresses, then separate each e-mail address with a comma in the "VALUE" section of this field.

All recipient e-mail addresses must also be listed in a file named .formmail. This file needs to be placed into your home directory on the server:

/usr/home/USERNAME

Replace USERNAME with your pair Networks account username. This file is a plain text file. You can list multiple e-mail addresses in it. Each e-mail address should be placed on its own line.

NOTE: If you are using the server hostname (i.e. http://www.pair.com/username/) instead of using a domain name in your account to access formmail.pl, and you would like to use the .formmail file to specify recipients, you must include your username via the username field described below.

username
This field specifies your account username. It is only required if you would like to use the .formmail file to specify e-mail addresses, and you are not using a domain name. Example:

<INPUT TYPE="hidden" NAME="username" VALUE="yourname">

Other Formmail.pl Fields

The fields below can be used when creating Web forms.

subject
This field specifies the Subject line of the outgoing e-mail. If not given, the default Subject is "WWW Form Submission." Example:

<INPUT TYPE="hidden" NAME="subject" VALUE="Some Subject Line">
You can also allow the user to specify the Subject field:

<INPUT TYPE="text" NAME="subject">
email
This field specifies the return e-mail address of the user submitting the form. If supplied, this should be a field filled in by the user. The e-mail will be generated so that your mailer's reply function should go to this e-mail address; if not supplied, the default is nobody@pair.com. Example:

<INPUT TYPE="text" NAME="email">
realname
This field specifies the real name of the user submitting the form. If supplied, this should be a field filled in by the user. The e-mail will be generated with this name in the headers. Example:

<INPUT TYPE="text" NAME="realname">
redirect
This field specifies the URL to which the user should be automatically redirected after successful delivery of the form. It must be a full URL; relative links will not work. If this field is not specified, a default response will be generated by the script. Example:

<INPUT TYPE="hidden" NAME="redirect" VALUE="http://example.com/whatever.html">
required
This field allows you to specify that certain fields in the form are "required." This means that these fields may not be empty when the form is submitted. If any of the specified fields are empty, the user will receive a warning, and the form will not be submitted. Example:

<INPUT TYPE="hidden" NAME="required" VALUE="email,subject">
env_report
This field specifies a list of environment variables that should be submitted along with the form contents. This is useful for recording, for example, the IP address of the user submitting the form. A few useful environment variables that records user information include:
  • REMOTE_ADDR - IP address of the user's host
  • HTTP_USER_AGENT - name and version of the user's Web browser

Example:

<INPUT TYPE="hidden" NAME="env_report" VALUE="REMOTE_HOST,HTTP_USER_AGENT">
sort
This field specifies how the fields submitted from the form should be sorted in the outgoing e-mail message. By default, the fields are not in any particular sort order (results are dependent on the user's browser). You may specify "alphabetic" for straight alphabetic sorting (same as form.cgi, described above), or you may specify the exact order with "order:." Examples:
<INPUT TYPE="hidden" NAME="sort" VALUE="alphabetic">
<INPUT TYPE="hidden" NAME="sort" VALUE="order:name,email,phone">
print_config
This field specifies that the formmail.pl control fields, normally removed from the body of the outgoing message, be included for completeness. Example:

<INPUT TYPE="hidden" NAME="print_config" VALUE="email,subject">
print_blank_fields
By default, non-required fields which are left blank will not be shown in the e-mail that is sent. If you would like these fields shown, set print_blank_fields to 1. Example:

<INPUT TYPE="hidden" NAME="print_blank_fields" VALUE="1">
title
This field specifies the title for the default response page that is generated by the script in absence of a redirect field. The default is "Thank You." Example:

<INPUT TYPE="hidden" NAME="title" VALUE="Form Results">
return_link_url
This field specifies a URL that will appear on the default response page that is generated by the script in absence of a redirect field. This URL can be used to allow users to return to, for example, your home page. Example:

<INPUT TYPE="hidden" NAME="return_link_url" VALUE="http://example.com/">
return_link_title
This field specifies the text that will be used inside the link generated when return_link_url is specified. Example:

<INPUT TYPE="hidden" NAME="return_link_title" VALUE="Return to Home Page">
background
This field specifies the URL of a background image that will be used on the default response page that is generated by the script in absence of a redirect field. Example:

<INPUT TYPE="hidden" NAME="background" VALUE="http://example.com/img/bkgr.gif">
bgcolor
This field specifies the background color that will be used on the default response page that is generated by the script in absence of a redirect field. Example (pure white):

<INPUT TYPE="hidden" NAME="bgcolor" VALUE="#FFFFFF">
text_color
This field specifies the text color that will be used on the default response page that is generated by the script in absence of a redirect field. Example (pure black):

<INPUT TYPE="hidden" NAME="text_color" VALUE="#000000">
link_color
This field specifies the unvisited link color that will be used on the default response page that is generated by the script in absence of a redirect field. Example (pure red):

<INPUT TYPE="hidden" NAME="link_color" VALUE="#FF0000">
vlink_color
This field specifies the visited link color that will be used on the default response page that is generated by the script in absence of a redirect field. Example (pure blue):

<INPUT TYPE="hidden" NAME="vlink_color" VALUE="#0000FF">
alink_color
This field specifies the active link color that will be used on the default response page that is generated by the script in absence of a redirect field. Example (pure green):

<INPUT TYPE="hidden" NAME="alink_color" VALUE="#00FF00">
This script can also be referenced as FormMail.pl.