![]() |
Business Internet Services |
|
The SendMail tag is used to send email to recipients with content produced at runtime. Most of the mail properties are configured at runtime from Parameter values. The content can be dynamically generated or loaded from template files. Runtime values can be inserted into templates. If you want to send separate emails to a number of different recipients the SendBulkMail tag may be a better choice. The SendMail tag has attributes for mailserver, debug and storeMsg. One or more mailservers can be listed in a comma delmited list. If the first server fails the next on in the list will be tried. If debug is set to true mailservers won't be contacted and no msg is sent. If storeMsg is true the runtime parameters and content that have been added to the msg will be stored under the keys msg.to, msg.from, msg.replyto, msg.cc, msg.bcc, msg.subject, and msg.content. The rest of the mail properties are specified using Parameter tags. The property names are: to, from, cc, bcc, replyto, subject, content. If a Parameter name matches one of these property names it's value or in some cases, multiple values, will be used to configure the property. Parameters that do not match proptery names will be used find runtime values to insert into the mail msg content. In this example the msg content is provided by a Cp tag and is hard coded.
The Cp content parameter can be replaced with other Parameter tags. In the
exmaple below the content comes from a text file that has values inserted at runtime.
If the debug attribute is set to true the mailserver won't be contacted and no msg is sent. You can use this to store the msg and print display it for testing before sending real mail. To display the msg on the page set storeMsg to true. The runtime content and parameters will stored under the keys msg.to, msg.from, msg.replyto, msg.cc, msg.bcc, msg.subject, and msg.content and can be displayed using Rp tags. @author Mark Ashworth @version 0.1, 2001-06-07 Return to Index Note: We have tried to test all of the code examples but they may contain errors. Any questions, comments, suggestions, or problems should be sent to info@plands.com. |
|
© 2005 Planetary
Data Systems.
All rights reserved. |