BTS2004: SMTP - Msg Body sent as attachment ??
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > BTS2004: SMTP - Msg Body sent as attachment ??




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-25-04 10: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





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:50 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register