Since March 24th, 2003 this script will only send mail to addresses in the columbia.edu and barnard.edu domains. This limit was imposed to prevent the script being used maliciously. Addresses outside those domains will be ignored. If there are no Columbia or Barnard addresses in the recipient field the script with fail and an error message will be displayed.
Look here for a sample
HTML form that uses generic-form-mail. After viewing it, you can save
that document in your public_html directory, and edit it to replace
firstname.lastname@example.org with your address. Or, instead of
using a separate document to send feedback you can insert the form in
an existing document. Just copy everything from
</form>, and then edit
The example uses a textarea field that allows the user to type past the right margin using many (perhaps all) of our browsers. The text will scroll to the left, allowing them to keep typing. When they hit <RETURN> the cursor moves to the next line. Mosaic and Netscape allow the user to type past the bottom margin (the text scrolls up), but Lynx does not.
The textarea field in the example is 9 lines long and 60 columns wide. You might want to display a text area of a different size, bearing in mind that Lynx does not scroll up. A smaller text area will encourage shorter messages.
As shown in the example, you can insert a salutation inside the
textarea field, between the
</textarea> tags. This is preferable to setting
salutation variable, which is described below.
The form contains hidden variables that are passed to the cgi program along with the data typed by the user. In our example we have the following:
<input type=hidden name=rmailreq value=false> <input type=hidden name=recipient value="email@example.com"> <input type=hidden name=mail_cc value="firstname.lastname@example.org"> <input type=hidden name=cc_sender value="on"> <input type=hidden name=subject value="comments about your web page"> <input type=hidden name=ack_link value="/~aaa888/test3.html">
trueif you want to force the user to enter their email address in the form when sending you form mail. Otherwise the email address is optional. Note that the email address will not be validated, so you can't be sure they are who they say they are. Beware of phony messages.
recipientvariable to your email address, so that you will receive the messages generated by this form. You can put a list of addresses here, separated by commas. The "@columbia.edu" part is optional, since that's the default host.
mail_ccvariable to the email address that should receive a CC (courtesy copy) of each message. This can be a list of addresses, separated by commas. The "@columbia.edu" part is optional, since that's the default host.
trueif you want the user to get a CC of their own message. The email address they type in the rmail field will be added to the
mail_cclist, if any.
subjectvariable to the text string that should be used as the subject of your form mail, for example: "comments about your football document". When you receive form mail from a user you will know immediately which document they are commenting on by looking at the subject. If you include the special symbol "$$" in your subject, it will be replaced with the process id of the generic-form-mail script. We use this feature to give each message a unique subject. For example "Web Comment $$" might become "Web Comment 9542" in the actual message.
ack_linkvariable, as shown in the example.
referervariable this way
salutationvariable can be used to insert some text at the beginning of the message entered by the user, for example: "Dear Charlie,". A better way to specify this text is to include it in the textarea field, as shown in the example.
Your form must contain a textarea field called
rmail field should always be included, since it gives
the user an opportunity to enter their email address. They can leave
this field blank if you made this an optional field (that is, if you
rmailreq variable to "false" or "").
When someone uses your form to send you mail you will receive an email message. In that message, the From: field will contain "www" and the Reply-To: field will contain their email address, if they typed it in the form. You should be aware that they might have typed someone else's address in that field, so beware of phony messages. When you reply to that message your mail program should automatically use the address in the Reply-To: field. Some mail programs ignore the Reply-To: field so they will send the reply to www instead of the appropriate user. If this happens to you please talk to the consultant about getting a better mail program for yourself.
If the user sends you mail without a Reply-To: field you will be unable to reply to them. Attempting to reply to those messages will send your reply to the www user, and the message will be discarded.
|Last modified 12/26/06 19:41
Research and Development Group
Academic Information Systems
|Help Line: |