Home | Place Order | Specials | Support | Resellers | International | Policies | Contact Us | What's New


Setting up PGP FormMail

Server Platform: Unix
Servers: Small Business Servers, Corporate Servers, Pro Servers
Keywords: E-Mail, email, cgi, scripts, bots, ssl

The following provides information on setting up the pgpformmail.pl CGI script
 
1. Installation
 
To install the pgpformmail.pl script, telnet to your server and do the following:
1.Type the following commands at the command prompt:
 
% cd
% vinstall pgp5formmail

2. Create a form that you would like the contents mailed to some address. The form should include the following fields:
pgpuserid= specifies user id for pgp executable
recipient = specifies who mail is sent to
username = specifies the remote users email address for replies
realname = specifies the remote users real identity
subject = specifies what you want the subject of your mail to be
 
For example, the HTML source for your form may look like this:

<form method="POST" action="/cgi-bin/pgp5formmail.pl">
<input type="hidden" name="pgpuserid" value="your_userid">
<input type="hidden" name="recipient" value="order@yourdomain.com">
<input type="hidden" name="subject" value="Order Request">
Please Enter Your Name:<br>
<input name="realname" size="40">
<p>
Please Enter Your Email Address:<br>
<input name="username" size="40">
<p>
Please Enter The $$$ Amount:<br>
<input name="amount" size="40">
<p>
.
.
.
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</form>

Where your_userid is the user ID for your public key. If your user ID contains characters that could be misinterpreted by a web browser, such as '<' and '>', you will want to replace these characters with the proper escape sequences. For example if your user ID were:

    John Doe <johnd@compuserve.com>

represent the user ID with the following string (note the &lt; and &gt; escape sequences):

    John Doe &lt;johnd@compuserve.com&gt;

NOTE: In order to use the pgp5formmail.pl script, you will have to install the pgp executable onto your virtual server, and either generate a public/secret key pair or have added an existing key file's contents to your public key ring.


2. Tips
 
One way to modify the pgpformmail.pl script is to include an autoresponder that emails the remote client some kind of response. To do this append something like the following to the bottom of the formmail.pl script.
 
# open a message to the remote client
open (MAIL, "|$mailprog $FORM{'username'}") || die "Can't open $mailprog!\n";
print MAIL "To: $FORM{'username'} ($FORM{'realname'})\n";
print MAIL "Reply-To: $FORM{'recipient'}\n";
print MAIL "From: $FORM{'recipient'}\n";
print MAIL "Subject: $FORM{'subject'}\n\n";
 
# write out a customized response to the mail message
print MAIL "We have received your message and are delighted";
print MAIL "you have chosen to do business with our company.";
print MAIL "You will find that we are very responsive and will";
print MAIL "get back with you shortly. Have a great day!";

# close the message
close (MAIL);

Home | Place Order | Specials | Support | Resellers | International | Policies | Contact Us | What's New

Information in this document is subject to change without notice. Other products and companies referred to herein are trademarks or registered trademarks of their respective companies or mark holders.
This page content, design and site are Copyright © 1997, 1998, 1999, 2000 Plateau Ltd.. All rights reserved.
Content may only be used with written permission. Active-Server.com, Reliable web site hosting and E-Commerce Ready! are trade marks of Active-Server.com. Active-Server.com is a division of Plateau Ltd.

. _