- EmailTemplates
- Home
- Overview
- Download
- Pricing
- Our Customers
- Who is using it?
- What are they saying?
- Getting Started
- The Basics
- Sample Templates
- Tips & Tricks
- For Advanced Users
- User Guide
- Contact Us
- Technical Support
- Feedback
Email Templates Scripting
In addition to the usual commands provided in Tcl and VBScript, Email Templates adds a new command, the et command. This et command should be treated as a normal Tcl or VBScript command with a variable number of arguments. This command supports the following options:
Email Templates Commands:
Tcl | VBScript | Does the following: |
et add element text | ET.Add "element", "text" | Adds a new template element in the templates. |
et alert text | ET.Alert "text" | Displays a message box with text as the message. |
et calc id element | ET.Calc ("id", "element") | Computes element in the message (item) with id id. The id of the item may be retrieved from other options, e.g. folder.If element is a hexadecimal number that starts with 0x (e.g. 0x0037001E), then the corresponding MAPI message property is returned. (For more information on MAPI properties, please refer to the MAPI SDK in the Microsoft Win32 SDK). |
et folder eid pathlist | ET.Folder ("eid", "pathlist") | Returns the MAPI id of the folder named pathlist. Pathlist is a list whose elements provide the path to the folder. |
et folder property folderid | ET.Folder ("property", "folderid") | Returns a particular property from the folder with id folderid. property may be either messages or subfolders. The first returns a list consisting of the id-s of the messages contained in the folder, while the second returns a list consisting of the id-s of the folders contained in the folder. |
et message element | ET.Message ("element") | Provides the value (text) of a template element (such as subject, body, etc.) with respect to the current message. If element is a hexadecimal number that starts with 0x (e.g. 0x0037001E), then the corresponding MAPI message property is returned. (For more information on MAPI properties, please refer to the MAPI SDK in the Microsoft Win32 SDK). |
et calc eid element | ET.Calc ("eid", "element") | Similar to message element, but operating on the message with entry id eid instead. |
et proplist eid | ET.Proplist ("eid") | Returns the list of property tags for the object with id eid.. |
et clear recipients | ET.Clear "recipients" | Clears the recipient list for the new message. New recipients may be set by using the set recipient command below. |
et set property value | ET.Set "property", "value" | Sets a property in the message being created. property may be: subject, recipient, or a MAPI tag (starting with 0x). In the case of recipient, the value consists of email name recipient_type address_type. If name is not specified, it defaults to email. recipient_type is one of the following: TO, CC, BCC (defaults to TO). address_type defaults to SMTP. |
et redirect "template1" "template2" | ET.Redirect "template1", "template2" | Continues processing by substituting the current template with the template with subject templatex (which must be of the same category). If more than one template is specified, than a new message is created for each of the specified templates. |
et defer time | ET.Defer "time" | Defers sending message by time. sendafter may also be used instead of defer. Examples of time include: 1 day, 1 week, 5 hours, 25 Nov 1998. |
et moveto pathlist | ET.Moveto "pathlist" | Moves the current message to the folder whose full path is given by pathlist in the Personal Messages store. |
et choose folder | ET.Choose "folder" | Displays a mailbox folder selection dialog. Returns the id of the folder, or an empty string if the user cancels the dialog. |
et choose filename | ET.Choose "filename" | Displays a file selection dialog. Returns the full path of the file, or an empty string if the user cancels the dialog. |
et stop | ET.Stop | Stops the execution of the script, and any further template processing. |
et input prompt default | ET.input ("prompt","default") | Prompts the user for the input of text. Prompt contains the text that is shown to the user. Default, if set, contains a default response to the prompt. |
et sendafter time | ET.Sendafter "time" | Defers sending message by time. Defer may also be used instead of sendafter. Examples of time include: 1 day, 1 week, 5 hours, 25 Nov 1998. |
et openurl url | ET.Openurl "url" | Opens a new window of the default browser to the URL specified in url . |