Sending attachments through a Dynamic Send Port
I spent a bit of time getting a Dynmic Send Port to email a message to a recipient as a text attachment (regardless of the filename suffix). The following documents the properties that need to be set on the message, and corresponding send port.
- Create the message (”msgEnvelope”) as a Multi-Part message, with the required message in the Message Body Part (”Attachment”)
- Set the following properties of the Envelope Message:
msgEnvelope(SMTP.Subject) = <Email Subject>;
msgEnvelope(SMTP.From) = <Sender Email>;
msgEnvelope(SMTP.SMTPHost) = <Email Host name>";
// This is the default value
msgEnvelope(SMTP.SMTPAuthenticate) = 0;
// Set the message text included in the email
msgEnvelope(SMTP.EmailBodyText) = <Text in body of email>;
// Important - This is required if the EmailBodyText is set
msgEnvelope(SMTP.EmailBodyTextCharset) = "utf-8";
// A value of '1' means include Message Body Part as email attachment
msgEnvelope(SMTP.MessagePartsAttachments) = 1;
// Important - Change this MIME type if not sending a Text file
msgEnvelope.Attachment(Microsoft.XLANGs.BaseTypes.ContentType) = "text/plain";
// Set the Filename of the attachment
msgEnvelope.Attachment(MIME.FileName) = <Physical name of the attachment>;
// We set the Email Address on the Port itself
Dynamic_Send_Port(Microsoft.XLANGs.BaseTypes.Address) = <recipient email address>;
The Send Port is then configured to use a custom Send Pipeline containing a Flat File assembler for the message schema to convert the message into the flat file.
No comments yet.
Leave a comment
-
Archives
- June 2009 (1)
- April 2009 (2)
- March 2009 (2)
- February 2009 (1)
- January 2009 (1)
- September 2008 (3)
- August 2008 (4)
-
Categories
-
RSS
Entries RSS
Comments RSS


