ComposeDMLMessage
Use this component to create the body of a direct mail message.
Although the component appears as ComposeDMLMessage in the Pipeline Editor, its ProgID is Commerce.DMLComposeMessage.
Intended use: DirectMailer pipeline, Compose E-mail stage.
Configuration Values
None.
Values Read
The ComposeDMLMessage component reads the following values from the indicated dictionaries.
Key | Dictionary | Description |
rcp_bypass |
Order | Boolean. The component bypasses (skips) processing if True. |
use_precomposed_body |
Order | Boolean. If True, the component creates the message from the plain-text body assigned to the precomposed_body key. |
precomposed_body |
Order | Optional. The plain-text message body. This key defaults to an empty string. |
rcp_url |
Order | Optional. The Uniform Resource Locator (URL) used to retrieve the mailing content. This takes precedence over default_url key. |
rcp_url_isfile |
Order | Optional. This is True if the URL for the content (rcp _url ) is a file and not an http:// address. |
rcp_url_content |
Order | Optional. The content of the file pointed to by the rcp _url key if the rcp _url _isfile key is True. |
from_field |
Order | The "From" field for the message. |
replyto_field |
Order | The "Reply-to" field for the message. |
rcp_email |
Order | The e-mail address of the recipient. |
subj_field |
Order | The "Subject" field for the message. |
rcp_formatting |
Order | Determines the format of the message. The options are:
0 Default formatting 1 Plain text 2 MIME 3 MHTML This key overrides the default formatting. |
rcp_personalize |
Order | Use this key to indicate whether or not to personalize the message for this recipient. The options are:
0 Do not personalize 1 Personalize This key defaults to 1 (personalize). |
rcp_locale |
Order | The locale code to use for the recipient. |
default_locale |
Order | Optional. The locale code to use if there is no recipient locale code (rcp_locale ). |
cookie |
Order | The dictionary containing the cookie data. |
cdo_message |
Context | A reference to the Collaboration Data Objects (CDO) message object (CDO.Message). |
cdo_config |
Context | A reference to the CDO configuration object (CDO.Configuration). |
default_url |
Context | Optional. The Uniforml Resource Locator (URL) used to retrieve the mailing content. |
default_url_isfile |
Context | Optional. This is True if the default URL is a file path and not an http:// path. |
default_url_content |
Context | Optional. The content of the file pointed to by the default _url key if the default _url _isfile key is True. |
default_formatting |
Context | Optional. The default format for the message. The options are:
0 Default formatting 1 Plain text 2 MIME 3 MHTML |
Values Written
The ComposeDMLMessage component writes the following values to the Order dictionary.
Key | Description |
cdo_result |
The result code (an HRESULT) from the most recent CDO operation. |
cdo_error |
Optional. An error string from the most recent CDO operation, if any. NULL if there is no error. |
Remarks
The ComposeDMLMessage component skips processing if the bypass flag (rcp
_bypass
) is True. Otherwise, it uses the Collaboration Data Objects (CDO) for Microsoft Windows 2000 to create the mail message. The component checks for errors after each CDO operation.
For non-personalized messages using a simple flat file, you may set the use
_precomposed
_body
key to True. The component will load the message body from the precomposed_body
key.
For personalized messages, the ComposeDMLMessage component uses the information gathered by the CreateUPMCookie component to create the cookie string.
The ComposeDMLMessage component can process multi-lingual messages using locale values from the Order dictionary (the rcp
_locale
key or the default
_locale
key). The locale values are passed to CDO without checking. If no locale code is given, the CDO default locale is used.
If a file path is used for the rcp
_url
key or the default
_url
key, Direct Mailer preloads the content of the file (into the rcp
_url
_content
key or the default
_url
_content
key) in order to improve performance. In this case, message content is limited to 2 megabytes for plain ASCII text and to 1 megabyte for Unicode text.