If you would like to use HTMaiL as backend for other forms, any fields not labeled body, to, mailto or from will be included at the end of the message, partially parsed (see templating information below). The contents of the fields apparently-from and apparently-subject will be parsed and placed into both the body of the message and the appropriate message header fields (from, subject). If you would like to redirect the successful posting to a page you maintain, rather than the normal, stock output that displays, you can use the successURL value. Note that this must be the fully-qualified URL of the success page, not just the name of the file.
HTMaiL v2.1-monkey has several new features. You can now create a custom template that will be used in place of the body of the message sent to you via HTMaiL. Templates are located in the directory and are referenced in your custom form using the bodytemplate field. HTMaiL will read in the template and replace occurances of 'HTMAIL:variable' with the contents of the field 'variable' from your form. An example template would look something like:
Dear HTMAIL:first_name, Is HTMAIL:city really as poopy as you say? I was going to call you at HTMAIL:phone but then I remembered what a loser you are. Your e-mail address (HTMAIL:email) is really stupid, monkeys are dumb.
Where first_name, city, phone, and email are all custom field names on your form. Values of 'Webmaster', 'Ann Arbor', '665-6555', and 'webmaster@monkey.org', entered into this form respectively, would result in a message like:
Dear Webmaster, Is Ann Arbor really as poopy as you say? I was going to call you at 665-6555 but then I remembered what a loser you are. Your e-mail address (webmaster@monkey.org) is really stupid, monkeys are dumb.
The recipent of the email message generated by this gateway can be specified using any one of several methods.
The most common method of doing this is in the ACTION field of the HTML form used for submitting the messages. This method is shown above, and is how your original HTMail Form is generated.
Recipents can also be specified via a 'mailto' field in the HTML form. This must be used in conjuction with a form ACTION attribute set to "http://www.monkey.org/cgi-bin/htmail". (See the example below.) If there is a user specified in the ACTION attribute, the 'mailto' field will not be used.
This allows you to do fun things like:
<form method=POST action="http://www.monkey.org/cgi-bin/htmail">
Subject:<SELECT name="subject">
<OPTION>Just a friendly message
<OPTION>About the homepage...
<OPTION>Something else...
</SELECT>
This should be sent to: <SELECT name="mailto">
<OPTION selected>webmaster
<OPTION>web-support
</SELECT>
If you have any questions about the use of HTMaiL, please send mail to webmaster@monkey.org .
If you want the monkey-hacked version, just ask.
All rights reserved, all wrongs reversed, your mother is a gorilla.Copyright © 1994, 1998 by the Regents of the University of Michigan.
User agrees to reproduce said copyright notice on all copies of the software made by the recipient. All Rights Reserved. Permission is hereby granted for the recipient to make copies and use this software for its own internal purposes only. Recipient of this software may not re-distribute this software outside of their own institution. Permission to market this software commercially, to include this product as part of a commercial product, or to make a derivative work for commercial purposes, is explicitly prohibited. All other uses are also prohibited unless authorized in writing by the Regents of the University of Michigan. This software is offered without warranty. The Regents of the University of Michigan disclaim all warranties, express or implied, including but not limited to the implied warranties of merchantability and fitness for any particular purpose. In no event shall the Regents of the University of Michigan be liable for loss or damage of any kind, including but not limited to incidental, indirect, consequential, or special damages.