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 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 values are:
0 — Default formatting 1 — Plain text 2 — MIME 3 — MHTML This key overrides the default formatting. |
rcp_personalize |
Order | Indicate whether or not to personalize the message for this recipient. The values 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 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 values are:
0 — Default formatting 1 — Plain text 2 — MIME 3 — MHTML |
cdo_CreateMHTMLBodyFlags |
Context | Optional. Responsible for controlling whether objects in the email message are embedded or not. If this key is not set, objects in the email are embedded. If the key is set to the appropriate value (31), the direct mail message body contains the output of the target web page as is.
For example, if MailFormat is set to 3 (MHTML), and the CreateMHTMLBodyFlags is set to 31, the mail message body snippets is: <img src=www.microsoft.com/banner.jpg height=100 width=100> If MailFormat is set to 3 (MHTML), and the CreateMHTMLBodyFlags is not set, the mail message body snippets is: <img src=cid:000101c1c44f$1bf3a256$_CDOSYS2.0 height=100 width=100 /> To set this key, you typically add a scriptor component preceding the ComposeDMLMessage pipeline component to the current stage with the following code:
For more information about the CreateMHTMLBody method and the CdoMHTMLFlags enumeration, see the Platform SDK in the MSDN Online Library at https://go.microsoft.com/fwlink/?LinkId=5161. |
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 can 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 multilingual messages using locale values from the Order dictionary (the rcp_locale
key or the default_locale key
). The locale values are passed to the 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.
See Also
Copyright © 2005 Microsoft Corporation.
All rights reserved.