Beginners Question About MIME Handling

  • Thread starter Thread starter Datawright
  • Start date Start date
D

Datawright

Apologies if this is a daft question but I'm new to c# and everything
is strange to me.

I have written a SOAP Extension class that intercepts a web service
that returns MIME attachmernts as part of a multipart. I have split
the MIME into strings which I write to a file via a BinaryWriter. All
this of course gives me is exactly the same content as the string.

My question is how do I take a string containing MIME and create a
file that represents the real attachements?

Thanks in advance.
 
You have to decode the MIME attachement "text" into a binary stream that can
be saved to the filesystem as the correct "document" type - e.g., if it is
"application/msword" then you would decode the MIME string into a byte array
and save it with the .doc extension.
You'll need to find some kind of MIME Parser for what you want to do .
Peter
 
Back
Top