|Subject:||Error decoding email.|
|Posted by:||Charles (charlesl…@hotmail.com)|
|Date:||Fri, 28 Mar 2008|
I am using Indy 10 with .NET 1.1. The issue i'm facing is that some of the email i'm receiving are being decoded incorrectly. I have compared the email with those that are correctly decoded and the only difference that i could find was due to Content-type. Body Messagepart is being decoded as AttachmentFile even though the Content-disposition is not attachment.
It seems that Indy 10 is doing a case sensitive check for the header segment.
In messages where the header is "Content-Type", it works fine.
In messages where the header is "Content-type", it works incorrectly.
The .NET code fragment is below.
For Each mp As MessagePart In msg.MessageParts
If mp.GetType() Is GetType(Indy.Sockets.AttachmentFile) Then
Dim att As AttachmentFile
att = CType(mp, AttachmentFile)
Sample provided below
Content-type: multipart/mixed; boundary="Boundary_(ID_5laWjxXmcYVA9VDF0JIq9Q)"
X-OriginalArrivalTime: 27 Mar 2008 23:49:14.0715 (UTC)
This is a multi-part message in MIME format
BODY CONTENT COMES HERE
Content-type: application/octet-stream; name=fwb.txt
Content-disposition: attachment; filename=fwb.txt