VirtualTec mailform documentation
Table Of Contents
Overview
VirtualTec MailForm is a CGI program that reads HTML fill-in form input, formats it into a readable message, and then sends it to the specified E-mail recipient. All you need to do is modify the HTML form with your mail form input fields and mail preferences.
Feature Summary:
- Simple installation and configuration through HTML INPUT tags.
- Messages or URLs can be specified for successfully (and unsuccessfully) delivered E-mail messages.
- Ability to use a template file to provide greater control over the format of the generated E-mail message.
- Support for international (ANSI) characters.
- Supports the creation of custom responses for user interaction.
Installation
Configuration
To use the VirtualTec MailForm, please specify
ACTION="http://webtools.virtualtec.ch/cgi-bin/mailform"
in your FORM to process your input.
The following tags are specified in the INPUT directives in the HTML document. Place them in your document as close to the FORM directive as possible. All of the tags are specified in the NAME item. Items with ":" are also specified entirely within the NAME item (for example, NAME="email_charset:iso8859-1"). A note on URL locations: For tags which specify URLs, either a complete URL (with "http" etc.) can be used, or a relative (local) path can be used. Relative paths are relative to the directory in which the HTML document is located.
At a minimum, you need "email_from", "email_to", and "email_subject". To designate additional variables as mandatory, declare them using additional <INPUT TYPE="HIDDEN" NAME="required:yourvariable" VALUE=""> tags.
- default_email_from
E-mail address of the sender when "email_from" is not filled in. Please note that this must be a complete, valid e-mail address, otherwise your forms might not be correctly processed.
<INPUT TYPE="HIDDEN" NAME="default_email_from" VALUE="defaultname@myserver.com">
email_charset:iso8859-1
email_charset:utf-8
- Causes the generated E-mail message to use the ISO 8859-1 (ANSI) or UTF-8 character set respectively, rather than the 7-bit character set. Used for international language support.
<INPUT TYPE="HIDDEN" NAME="email_charset:iso8859-1" VALUE="">
email_field_separator
- String inserted in between the field names and values in the generated E-mail. Default is " : ".
<INPUT TYPE="HIDDEN" NAME="email_field_separator" VALUE=" : ">
email_from
- E-mail address of the sender. Please note that this must be a complete, valid e-mail address, otherwise your forms might not be correctly processed.
<INPUT TYPE="TEXT" NAME="email_from" VALUE="myname@myserver.com">
email_subject
- E-mail subject.
<INPUT TYPE="HIDDEN" NAME="email_subject" VALUE="Some E-mail">
email_template_url
- Specifies the location and name of the file containing the template which describes the format of the generated E-mail. The file should contain the desired INPUT field names surrounded by percent signs ("%"). All other text in the file will be inserted as-is. Field names are not case-sensitive. Note: do not specify any mail headers in this file, they'd be copied into the mail body which is probably not what you want. Also, please don't use any MIME encoded form of e-mail (like, for example, HTML-style e-mails), since you're not able to set the content-type (header value) of your e-mail to anything else than "text/plain".
<INPUT TYPE="HIDDEN" NAME="email_template_url" VALUE="http://your.web.server/your-email-template.txt">
email_to
- E-mail address of the recipient. Note: all e-mail addresses you intend to specify here in your forms need to be registered with VirtualTec support (please send us an email listing your VirtualTec web server address and the address(es) you'd like to use with mailform to support@virtualtec.ch). This step is - unfortunately - necessary to prevent the mailform from being abused by spammers.
<INPUT TYPE="HIDDEN" NAME="email_to" VALUE="yourname@yourserver.com">
failure_message
- Message to be displayed for unsuccessfully delivered E-mail.
<INPUT TYPE="HIDDEN" NAME="failure_message" VALUE="Oops">
failure_message_url
- URL of file to be displayed for unsuccessfully delivered E-mail. This can be either a full URL (as in the example) or a partial URL if the document to be displayed is on the same server.
<INPUT TYPE="HIDDEN" NAME="failure_message_url" VALUE="http://www.xyz.com/failure.html">
require_message
- Message to be displayed when the user does not supply a value for a "require:" field.
<INPUT TYPE="HIDDEN" NAME="require_message" VALUE="A required field was left blank">
require_message_url
- URL of file to be displayed when the user does not supply a value for a "require:" field. This can be either a full URL (as in the example) or a partial URL if the document to be displayed is on the same server.
<INPUT TYPE="HIDDEN" NAME="require_message_url" VALUE="http://www.xyz.com/require.html">
success_message
- Message to be displayed for successfully delivered E-mail.
<INPUT TYPE="HIDDEN" NAME="success_message" VALUE="E-mail sent">
success_message_url
- URL of file to be displayed for successfully delivered E-mail. This can be either a full URL (as in the example) or a partial URL if the document to be displayed is on the same server. This option does not function in the evaluation version. This tag is overridden by the "success_message_template" tag.
<INPUT TYPE="HIDDEN" NAME="success_message_url" VALUE="http://www.xyz.com/success.html">
Bitte beachten Sie, dass VirtualTec diesen Service so "wie er ist" zur Verfügung stellt. Wir können weder eine Garantie dafür übernehmen, dass dieses Script mit sämtlichen Browser auf allen verfügbaren Plattformen und in jeder denkbaren Konstellation funktionsfähig ist, noch können wir darauf weiterführenderen Support leisten als im Rahmen unseren allgemeinen Geschäfts- und Supportbedingungen. Wir behalten uns vor, die Art bzw. den Umfang des hier zur Verfügung gestellten Service jederzeit und ohne vorherige Ankündigung zu ändern oder an die jeweilige technische Umgebung von VirtualTec anzupassen. Die Verwendung dieses Service geschieht auf eigenes Risiko.