WebCarbon (previously called MailForm) is a handler for Web-based forms that sends an exact carbon copy of the form through e-mail, preserving all the HTML formatting of the original.
The result is readable in any HTML-aware e-mail program.
Any HTML Web form can be quickly adapted to use it, similarly to formmail.pl or FrontPage’s form to e-mail webbot, except the resulting e-mail isn’t text only.
The recipient of the e-mail may find it easier to read the form in HTML format with field positioning and labels intact, rather than see a text list of fields using internal HTML field names that aren’t visible on the original Web form. For large forms, forms whose fields haven’t all been given meaningful names, or forms using a grid format, WebCarbon is a huge help.
Additional features:
When the user submits the form from the Web, WebCarbon receives the names and values of the fields that the user filled in. It also receives hidden fields set by the Web author (which the end user cannot easily change), and this type of field is normally used to specify WebCarbon settings.
One of those settings indentifies an HTML template file, which at its most basic is a duplicate of the Web page containing the form: a page of blank fields. WebCarbon reads the template and substitutes each value the user entered into the fields of the template. WebCarbon uses this blank form template as a basis, but changes its HTML code so it recreates the field values the user saw just before submitting the form. It knows how to change the values of all the regular form elements: text fields, textarea fields, checkboxes, radio buttons, and select elements (also known as drop-downs, pop-up menus, list boxes, or pick lists).
Note that the original Web page and the HTML e-mail template are separate. WebCarbon never needs to read or locate the original Web page. So the form can be submitted from any type of page: an ASP page or an HTML e-mail message, for example. It reads only the template file and sends its filled-in version to the e-mail client. This means that the template has to be a regular HTML file: server-side code, such as SSI (server-side includes) and ASP code, won’t be processed.
WebCarbon e-mails the result to everyone on the recipient list (see the MailForm_To parameter) and sends the user’s browser to a confirmation page (see the MailForm_Confirm parameter).
If you are a web site administrator and your site does not already have WebCarbon installation, see the Installation Guide.
Construct the Web form in any HTML editor. Afterwards, there are just a few modifications to make so that its Submit button will send the values to WebCarbon and so that WebCarbon has a recipient list, subject, and template for the e-mail. The template is usually a copy of the the original form, but it has to be regular static HTML. WebCarbon won’t run any ASP code or server-side includes in the e-mail template. (You can include all you want in the original form on the Web, though, since WebCarbon doesn’t even look at that--it only sees the values the user submitted and merges them into the specifed template file.)
The exact steps are described below, but to summarize for the impatient, you will be setting the form action to /scripts/WebCarbon/WebCarbon.pycgi
and adding hidden fields called MailForm_Subject, MailForm_To, MailForm_Confirm, and MailForm_TemplateURL. There are directions for graphical editors next, but if you’re comfortable with HTML code you switch into HTML view and use the code below.
These directions are written for FrontPage 2000. I’ll add directions for other editors later, but they will follow along the same lines.
/scripts/WebCarbon/WebCarbon.pycgi
into the Action field, and make sure "POST" is chosen for the Method field. Then click OK. Keep the Form Properties dialog box open, though, because you’ll need it for the next step.Name | Value | |||||||
---|---|---|---|---|---|---|---|---|
MailForm_To | Recipient’s e-mail address, such as jsmith5014@acme.com. For more than one recipient, you can either separate the addresses with a semicolon or include multiple MailForm_To fields. | |||||||
MailForm_Confirm | The URL of your confirmation page, to be displayed after the user submits the form. It should start with a slash, like /YourSiteFolderPath/YourConfirmationPage.html. (The reason for this is that MailForm_Confirm URL should normally be a site-relative path, beginning with a slash, specifying the Web page to appear after the form is submitted. If the URL is not site-relative or absolute, it will be interpreted as being relative to the script file, which is usually not what you want.) | |||||||
MailForm_Subject | Subject line of the e-mail | |||||||
MailForm_TemplateURL | (WebCarbon only) A site-relative URL specifying the template file. This file must be placed inside a folder named _templates . (This is for security, so that WebCarbon can’t be asked to read arbitrary files inside the web root.) The _templates folder can be anywhere inside the Web root--IIS virtual directories won't work--but it's easiest to put it in the same folder as the original Web form. So, a sample directory structure:
|