BizTalk Server Orchestration - Sending email with binary attachments in BTS 2006

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > June 2006 > Sending email with binary attachments in BTS 2006





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 Sending email with binary attachments in BTS 2006
zia

2006-06-01, 1:17 am

I'm trying to send an email with multiple attachments from an orchestration
using a SMTP port in BTS 2006 using custom pipeline component with MIME
encoder. I got it to work where I get an email with multiple attachments but
the attachment data is corrupted for binary attachments (.exe or .doc etc).
The orchestration calls custom .Net code which creates and populates the
multiple parts with the attachment data. Here is the code snippet for
reference:

byte[] databytes = System.IO.File.ReadAllBytes(@"C:\notepad.exe");
MainMessage.AddPart(databytes, "Attachment1");
Microsoft.XLANGs.BaseTypes.XLANGPart part1 = message["Attachment1"];
part1.SetPartProperty(typeof(MIME.FileName), "t2.exe");

How can I get the binary attachments to work without them getting corrupt?
Any help on this would be appreciated.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com