Return CGI Library
Return Form Handling
It's been demonstrated to us that there are situations where you might want to take the contents of one form and send it to several
different addresses at the same time.
The simplest way to do that is simply to specify multiple addresses in the TO field. e.g.
<input type="hidden" name="TO" value="user1@domain1.com,user2@somewhere.else" />
However that doesn't work when you want to send different messages to multiple addresses. For example: from one form you might
want to send an order to your warehouse, an order-confirmation to the customer, and billing information to your accounting department).
For that, you need to be able to specify multiple sets of TO and TEMPLATE parameters... This is simple, just use append a single digit
to the name of the variable (e.g. TO1 and TEMPLATE1). You may also specify an alternative FROM address (e.g. FROM1).
In order to make things more flexible, we've enabled the variable expressions in the TO, FROM, and TEMPLATE fields...
so you could specify:
<input type="hidden" name="TO" value="support@baremetal.com" />
<input type="hidden" name="TO1" value="{FROM}" />
<input type="hidden" name="FROM1" value="{TO}" />
What's your e-mail address? <input type="text" name="FROM" value="{FROM}" />
Which would send a message from the visitor to support@baremetal.com, and at the same time a message from support@baremetal.com to the
visitor!
Let's try a real example, sending two different messages to the same address:
|