by "=?Utf-8?B?Ui5CYWxhc3VicmFtYW5pYW0=?=" <RBalasubramaniam@[EMAIL PROTECTED]
Jul 26, 2005 at 10:16 AM
Hi all,
I have a multipart email message that contain a body part and one or more
attachment parts. I want to save the attachments to a folder and do
further
processing.
I am facing two problems.
1) I try to save the attachments to disc by calling a .net assembly. I
pass
the Message as input parameter. My function looks something like the
following snippet.
public void MyFunction(XLANGMessage objMessage)
{
for (int i=0; i < objMessage.Count; i++)
{
XLANGPart objPart = objMessage[0];
Stream objStream = (Stream)objPart.RetrieveAs( typeof(Stream) );
// Save it to Disc ...
}
}
But I need to save the attachments with the same filename and file format
as
they are in the input SMTP email message. I tried to get the attachment
filename using XLangPart.Name property. But it returns as Attachment1,
Attachment2 etc instead of the Original Attached filenames.
I need atleast the file type to save to disc in the native format and
perform different processings for different filetypes.
2) As per my requirement there can be multiple or no attachments in the
email. When i define a multipart message type in the orchestration, I am
forced to define the number of attachments that the message will contain.
If
there are variable number of attachments how the message needs to be
defined?
Any ideas on what i am missing will be greatly appreciated.
Many Thanks,
R.Balasubramaniam