When trying to send a message via the SMTP adapter in BizTalk we have the option of attaching messages as part of Multi-Part Messages. If the message being attached is too large the message will fail to send. In our application, we send email notifications of failed messages in BizTalk with the original message sent as an attachment.
An solution we devised was to compress the original message and attach it to the email. This solution, however, presented its own considerations.
We didn’t want to create a temporary directory on a server to create the compressed file in. We wanted to do all of the compression in memory.
Since we were compressing in memory we had to come up with a solution to attach the file to the email message.
The compression in memory is discussed in my posting on File Compression In Memory. …