|
-
June 12th, 2002, 06:07 PM
#1
Wanted: MIME Decoder
I'm looking for C# code that has a MIME decoder.
Anyone?
rflagg
-
June 18th, 2002, 12:38 PM
#2
Try this code in C# to convert base64-encoded text (FromBase64Transform class can be found in System.Security.Cryptography namespace)
FromBase64Transform transformer = new FromBase64Transform();
byte[] byteData = transformer.TransformFinalBlock(base64Data, 0, base64Data.Length);
It's counterpart is ToBase64Transform.
Have fun.
-
June 18th, 2002, 12:46 PM
#3
Originally posted by AlenT
Try this code in C# to convert base64-encoded text (FromBase64Transform class can be found in System.Security.Cryptography namespace)
FromBase64Transform transformer = new FromBase64Transform();
byte[] byteData = transformer.TransformFinalBlock(base64Data, 0, base64Data.Length);
It's counterpart is ToBase64Transform.
Have fun.
Thanks. But that is just one piece of the MIME puzzle. I need something that can deMIME this shortened example:
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0000_01C20BF2.B40CBCC0"
Thread-Index: AcIMLVzIoG7skYNvTZqVxcybu46cew==
Content-Class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
This is a multi-part message in MIME format.
------=_NextPart_000_0000_01C20BF2.B40CBCC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
This
is some text being sent along!
------=_NextPart_000_0000_01C20BF2.B40CBCC0
Content-Type: application/octet-stream;
name="rad2E822.tmp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="rad2E822.tmp"
gAAAANAMFgEAAAEMIwBClgAARQRcAAAAlloGAAABAAAAAAAABAAAAAAwMTkyMjQ4MCAgICAgICAg
IDA3NTI0MDAxIEEwMDEwMTAxQ0cgICAgNDcgICAgVUhSQlROOCAgICAgICAwMDI4ICAgICAgICAg
(This is the Base64 portion that your code snippit can decode!)
///////////////////////ABABA
------=_NextPart_000_0000_01C20BF2.B40CBCC0--
-
June 18th, 2002, 05:47 PM
#4
O-ops, sorry. Thought you only needed to decode the base64 attachement - that's the most difficult part usually - and the solution seemed simple enough using FromBase64Transform .
Alen.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|