Home...     Support...     Hosting...     Order...     Contact...


 

PGP and PGPMail

PGP stands for "Pretty Good Privacy" and it allows people to exchange email with both privacy and authentication.

How To Create The PGP Mail Key

Before using PGPMail, you will need to create a public key using your email software. Your email software should have instructions to create the key. Once the key is created, enter the PGP option inside your control panel, paste the PGP Key text into the box provided, and then click add.

The key code should look similar to the following:

-----BegiN PGP PUBLIC KEY BLOCK-----
Version: PGPfreeware 5.0i for non-commercial use
mQGiBDZiwWERBADgftCC3ZrT1JHcK5gvSA7Tuw5CmU2c8NWrFz
AywkARHh7niTFJsg1VfEi5ExsNDBVvmvr+vZD6Zq9eYtodkx1E41gJF
ZegGHzqya+WaiGknQ6zUVEmgw9NGpIA2+iyR3FrGPG8Fq3MvF+8q
Nm9LGUVR6jjBwdERpRDkmnShg/QSQCg/87M
................................................................
tbzYRdmHzvGpR/Hvo7NKKhF0Z3Xu+5KeXsI8iQA+AwUYNmLBg
GAlch3jE84DEQLIIgCg5wk8RciT6SL5/hdg5QMb6h/n8e0Ali0k3+
TFSGtLwdn+YOn6hkYnfSU=
=jZZO
-----END PGP PUBLIC KEY BLOCK-----

Using PGP Mail

To use PGPMail, you need to create a form on one of your web pages.

The form action line should be:

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

pgpmail.pl will do all the programming work for you. You alter the behavior of pgpmail by using hidden fields in your form.

Necessary PGP Form Fields

There are three form fields that you must have in your form for PGPMail to work correctly. This is the recipient, username, and keyname fields.

RECIPIENT - This form field allows you to specify to whom your form results should be mailed. Most likely you will want to configure this option as a hidden form field with a value equal to that of your e-mail address.  The code should be written as follows:

 <input type="hidden" name="recipient" value="youremail@yourdomain.com">

USERNAME
- This form field allows you to specify your username in the system. This allows PGPMail to look for the configuration files to encrypt the mail to be sent to you. You should replace "yourusername" with your main username on the system.  This is the username you use to login to your domain.

 <input type="hidden" name="username" value="yourusername">

KEYNAME - This allows you to specify the name of your public key. This will be the public key that PGPMail uses to encrypt your mail. You must possess the private key in order to decrypt the email that is sent. You can get your public key name by going to the PGP Manager. It is typically just your email address.

 <input type="hidden" name="keyname" value="publickeyname">

Optional PGP Form Fields

SUBJECT - The subject field will allow you to specify the subject that you wish to appear in the e-mail that is sent to you once your form is submitted by the user.  If you do not use the subject field, the e-mail will come through with a default subject of "WWW Form Submission"

To choose your own subject, use the following code:

<input type="text" name="subject" value="Your Subject" size="20">

Replace "Your Subject" with what you want your subject to be.  You can also modify the size value.  This signifies the length of the text box as it appears on your form.

EMAIL - This form field will allow the user to specify their return e-mail address. It will also indicate to you where the e-mail originates from when you receive it in your e-mail program.

 <input type= "text" name="email" size="20">

As with the previous explanation, the size indicates the length of the text box on your form.  You can modify this as necessary.

REALNAME - The realname form field will allow the user to input their real name. This field is useful for identification purposes and will also be put into the From: line of your message header. 

<input type="text" name="realname" size="20">

REDIRECT - Once the user submits the form, if you wish to redirect them to different URL, you can use this hidden variable to send them to a pre-made HTML page (such as thanks.html)

<input type="text" name="redirect" value="http://www.yourdomain.com/thanks.shtml">

REQUIRED - You can require that certain fields in your form be filled in before it can be successfully submitted. Simply place all field names that you want to be mandatory, separated by a comma, into this field. If the required fields are not filled in, the user will be notified of what they need to fill in, and a link back to the form they just submitted will be provided. 

<input type="hidden" name="required" value="email,phone">

Replace email,phone with the actual list of fields that you wish to be required.  The field names are case sensitive and should match exactly what you named them in the html code of your form.

MISSING_FIELDS_REDIRECT - If a user does not fill in all the required fields of your form, they will be taken to a default page which tells them which fields are missing.  If you wish to create your own custom page, you can add code to the form to redirect the user to your page when an error occurs.

<input type="hidden" name="missing_fields_redirect" value="http://your.host.com/error.html">

Replace the value field with your domain name and the location of your error file.

ENV_REPORT - This code allows you to extract environment variables from the user upon submission. It comes in handy if you want to know what browser the visitor was using, what domain they were coming from, or any other such attributes.

The most common variables are:
  REMOTE_HOST - Sends the hostname making a request. 
  REMOTE_ADDR - Sends the IP address of the remote host making the request.
  HTTP_USER_AGENT - The browser the client is using to send the request. 

<input type="hidden" name="env_report" value="REMOTE_HOST, HTTP_USER_AGENT">

For more information on environment variables, visit: http://www.cgi-resources.com/Documentation  

SORT - This field allows you to choose the order in which your variables appear in the e-mail that FormMail generates. You can choose to have the field sorted alphabetically or specify a set order in which you want the fields to appear in your mail message. If you leave this field out, the order will simply default to the order in which the browser sends the information to the script (which is usually the exact same order as they appeared in the form.) When sorting by a set order of fields, you should include the phrase "order:" as the first part of your value for the sort field, and then follow that with the field names you want to be listed in the e-mail message, separated by commas. 

<input type="hidden" name="sort" value="order:name1,name2, name3,etc...">

Replace name1,name2,name3,etc... with your own field names.

PRINT_CONFIG - This allows you to specify which of the config variables you would like to have printed in your e-mail message. By default, no config fields are printed to your e-mail. The important form fields, like email and subject are included in the header of the message; however you may wish to have them printed in the body as well. The config fields that you wish to have printed should be in the value attribute of your input tag separated by commas. 

For example, if you wanted to print the email and subject fields in the body of your message, you would place the following form tag:

<input type="hidden" name="print_config" value="email,subject">

PRINT_BLANK_FIELDS - This code allows you to request that all form fields are printed in the return HTML, regardless of whether or not they were filled in. FormMail defaults to turning this off, so that unused form fields aren't e-mailed. If you want to include them, use the following code:

<input type="hidden" name="print_blank_fields" value="1"> 

TITLE - This field allows you to specify the title and header that will appear on the resulting page if you do not specify a redirect URL. If you wanted a title of 'Feedback Form Results' you would use the following code:

<input type="hidden" name="title" value="Feedback Form Results">

RETURN_LINK_URL- This field allows you to specify a clickable URL that will appear on the page that is generated once the form has been submitted. This field will not be used if you have the redirect field set.

<input type="hidden" name="return_link_url" value="http://yourdomain.com">

RETURN_LINK_TITLE - This is the title that will be used to link the user back to the page you specify with return_link_url. The two fields will be shown together on the resulting form page as a highlighted hyperlink like the one below. (The following example assumes that your return_link_title was set to "Feedback Form Results")

BACKGROUND - This field allows you to specify a background image that will appear if you do not have the redirect field set. This image will appear as the background to the form results page.  

<input type="hidden" name="background" value="http://yourdomain.com/image.gif">

Replace yourdomain.com with your domain name, and image.gif with the name of your image.

BGCOLOR - This field allows you to specify a background color for the form results page, much in the same way you specify a background image. This field should not be set if the redirect field is. For a background color of white, you would use:

<input type="hidden" name="bgcolor" value="#FFFFFF">

TEXT_COLOR - This field works the same way bgcolor does, except that it will change the color of your text.  For black text, you would use: 

<input type="hidden" name="text_color" value="#000000">

LINK_COLOR - This changes the color of the hyperlink on the resulting page.  It works in the same fashion as text_color, and also should not be used if you are using redirect.  The following example calls for a red link.

<input type="hidden" name="link_color" value="#FF0000">

VLINK_COLOR - This changes the color of visited links on the resulting page. It works exactly the same as link_color.  For a visited link color of blue, you would use:

<input type="hidden" name="vlink_color" value="#0000FF">

ALINK_COLOR - This changes the color of active links on the resulting page. An active link is shown when the mouse is moved over the link. It also works exactly the same as link_color.  For an active link color of blue, you would use:

<input type="hidden" name="alink_color" value="#0000FF">

If you need additional help in setting up PGP, visit PGP.com for more information.

 

Account Overview
Control Panel Overview
Anonymous FTP
Archive Manager
CGI-BIN
Changing Passwords
Counters
Email Software Setup
File Manager
FormMail
FTP Instructions
Mail Manager
Mailing Lists
Mime Types
MS FrontPage® 98, 2000
MySQL
Password Protection
PGP & PGP Mail
Real Audio/Real Video
Redirect URL
Search Engine
Secure Server SSL
Shopping Cart
Site Creation Tool
Site Statistics
SSH / Telnet
 

Home...     Support...     Hosting...     Order...    Contact...

copyright©1996 - 2006  MouseBytes.net