BizTalk Server Orchestration - BTS2004: SMTP - Msg Body sent as attachment ??

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > October 2004 > BTS2004: SMTP - Msg Body sent as attachment ??





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author BTS2004: SMTP - Msg Body sent as attachment ??
MarkS

2004-10-25, 5:48 pm

I'm using the SMTP adapter to send an email with an attachment. In testing,
I was able to send a nice, plain text message... and I'm able to send an
attachment; but when setting it up to do both - that's when it breaks.

For some goofy reason, both the attachment (zip, pdf, what ever) and the
body text of the email are being sent as attachments.

I do have my multi-part message set up as such...

Multi-part Message Types
.... EmailOutMessage
.... ... EmailAttachment
.... ... EmailText

EmailAttachment is of type System.Xml.XmlDocument
EmailText is of type Microsoft.XLANGs.CustomFormattersSDK.RawString

Here's the code that I've put into the MessageAssignment shape:

// Set email body text here...
EmailOut.EmailText = new
Microsoft.XLANGs.CustomFormattersSDK.RawString.RawString("This is a test
message. Your report is attached");
// Set the attachment here...
EmailOut.EmailAttachment = PDFIn;
// Set the Context Type...
SMTPUtils.Part.SetContentType(EmailOut.EmailText, "text/html");
//set the content type for the attachment
SMTPUtils.Part.SetContentType(EmailOut.EmailAttachment,"text/xml");
// Change the attachment filename to something useful...
SMTPUtils.Part.SetFileName(EmailOut.EmailAttachment, filename);
// Set email subject here...
EmailOut(SMTP.Subject) = "Message from BizTalk SMTP Adapter";
// Set dynamic port email address value...
Port_2(Microsoft.XLANGs.BaseTypes.Address) = "mailto:" +
EmailData2.EmailAddress;

AND.... I have a send pipeline set up using the MIME/SMIME encoder. The
"Send body part as attachment" is set to "False"

Everything looks right (according to the samples I've seen)... any ideas???

MarkS
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com