|
HTMLMailProcess |
|
|
HTMLMailProcess is designed to be used in Process Management framework. You should be familiar with Process Management framework in order to use TextMailProcess element efficiently. Using HTMLMailProcess element you can send HTML mails with dynamic content to the mail recipients. Place the element into a ProcessBlock or ProcessForm Element and set its properties.
Properties SMTP Account The sender of the mails. To, CC, BCC (Accepts MScript) These are the standard parameters that define the mail recipients. Subject (Accepts MScript) You can either enter the text of the mail subject directly into this parameter or specify the reserved symbol "TITLE_OF_TEMPLATE" to instruct the process broker to take it from the Title property of the page that will be sent as HTML mail. Template Page (Accepts MScript) Specify the name of the MoreMotion Page which was prepared as a HTML mail. A Template page can be a static or a dynamic page. The static template pages (HTML pages) are sent to the recipients as they are, but the dynamic pages (XSL pages) are first converted to HTML by performing a server side XSLT processing. The XML data required for the XSLT processing are obtained from the fields specified in Fields to Include parameter. Note: Set the Base Href Property of the mail page if it contains external sources like image files or external javascripts. The Base Href Property should contain the full URL of the web site where the external sources are located. Example: http://www.mycomp.com XML Content (Comma separated symbols) (Accepts MScript) If the mail template is dynamic, which means is an XSL page, then you should specify the symbols that will provide the XML data. The symbols that can be specified here is as follows:
Example: f:Name, i:Stock, v:Status, LastWeekOrders
XML Fields: Please note that a Process Record Field or a Pool Variable can store XML data. A Datasource (ADOM) can be converted to XML and stored in a Process Record Field or in a Pool Variable by the mor > ADOM > ADOMToXMLProcess Element. Generating XML data out of the values of the specified fields: It is important to know the structure of the XML data created in order to successfully bind the XML nodes to element properties when developing the HTML mail page Assume that the specified fields contain the following values at the time the HTMLMailProcess is executed.
f:Name i:Stock v:Status LastWeekOrders ----------- --------- ---------- --------------------------------------- Printer 12 Discounted <item> <custid>5</custid> <qty>5</qty> </item> <item> <custid>33</custid> <qty>20</qty> </item>
Attachments (Comma delimited) (Accepts MScript) One or more file names can be specified in this property (by delimiting them with commas) as mail attachments. The names can be defined relative to the web application root or can be absolute file names. Syntax: [attachment-name | ] file-name [, [attachment-name | file-name ] ] attachment-name : The name of the attachment that will appear in the e-mail. When this optional parameter is omitted the file-name is used as the attachment name.
file-name : The name of the file to be attached. It can be an absolute file path or it can be defined relative to the web application root. A process block field name or a pool variable name can also be given instead of a file name. If this is the case the PB field or pool variable should contain the File Object of the file. Using this feature, for example, a pdf document created and placed in a pool variable as a file object by "mor > Fop > FopProcess" can be attached to the e-mail.
Examples:
Send In E-mails can be sent in the foreground or in the background. If big amount of the email is expected to be processed then choose the option "2. Background" so that the user is not locked until the all the emails are sent. Background Thread Quantity If the choice of the "Send In" property is "2. Background" then this property can be assigned the number of the sender threads to be started in the background. This feature can be used shorten the sending time. Log File Name (Accepts MScript) If a log file name is specified in this property the Mailer component writes the log records in it to report successful and unsuccessful sendings. The file can be specified absolute of relative to the root directory of the web application. Send Status Target Symbol (Accepts MScript) The symbol defined here will be assigned a status code right after a mail is attempted to be sent. By checking its value the following processes can make decisions. f:SEND_STATUS is the default target symbol. This property is valid when "Send In" property is "1. Foreground". The status codes are: Completion Codes This Process returns the following completion code
|