The easiest way to write a form and send it to multiple people is to use a mailto form and use that to send it to multiple people. Put multiple email addresses in the action field by separating them with a comma:
<form action="mailto:email@example.com,firstname.lastname@example.org"> ... </form>
This example uses the "email-to" function of form-submit, which causes form results to be emailed to a specific email address, using a template file as a model for the message. Here, it's assumed that this form is being used by J. Random User, who has a Web page at http://www.mv.com/ipusers/jruser and an email user of email@example.com . J. Random has created a directory forms for various forms, including this one; and in this directory there are the following files that make this particular form work:
em.html - the HTML form itself
This is the form that the submitter fills in; submitting this form causes form-submit to email a message based on the information filled in here. This form asks for the submitter's name, email address, and some comments.
By filling out this small form you can send me some comments.
The most important line is the reference to the form-submit utility:
Here, the argument /ipusers/jrusers/forms gives the path from the top of the WWW tree to J. Random's forms directory, and the final element em identifies the form to be used. Given this, form-submit will take its directions from a file named em.submit in that forms directory.
The Form Submit file - the em.submit
The em.submit file tells form-submit how to proceed with processing the form submitted from em.html .
# submit file for email form
Tag-Default comments ""
This file says that the submitter's name must be provided, and that the comments field, if omitted, will be set to blanks -- this will make sure that there is a translation for the comments field when it is included in the email message. The file also specifies that the results of the form should be emailed to firstname.lastname@example.org using the file em.template as a model. That file (the template file) contains form-submit style substitutions so that the actual submitted information can be sent in the desired format. Finally, the em.submit file says that when the form is successfully processed, a file em-done.html should be returned to the submitter as a confirmation page.
The Sumbit Control File -
The em.template file is identified in the em.submit control file as the file that will be sent as email each time a submission is made. This template file has the appropriate forms-submit substitution strings so that the input data can be included in the email message.
Subject: Comments from EM form
Comments from: ~name
Note that the first line of this template file can provide part of the email header; in this case the Subject: line is provided. A blank line should follow any header text provided.
makes sure that the submitter's email address is included in the email message only if there was one provided. Note the use of the continuation characters to suppress extraneous blank lines.
This is simply a page that is returned to the submitter after the form has been processed.
Your comments have been received. Please use your "back" function to return.