Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Aug : Problem with Delphi 2006 Indy that is NOT in Kyix/Indy
| Subject: | Problem with Delphi 2006 Indy that is NOT in Kyix/Indy |
| Posted by: | "Vincent" (vydori..@gmail.com) |
| Date: | Mon, 14 Aug 2006 08:30:29 |
I am in the process of porting my code form the now defunct Kylix
(Professional Version 3) compliers to Delphi 2006. Under both I am using the
versions of Indy that came with them. With the Kylix version I can correctly
decode every attachment that we see in our typical case, with the Delphi
2006 (Enterprise version) Indy I can not decode a specific case, here is the
email source from the case in question...
---BEGIN EMAIL PASTE---
To: *removed*
From: /S=SERVICE/PRMD=GLOBALEC/ADMD=STERLING/C=US@x400.globalec.com
Reply-To: /S=SERVICE/PRMD=GLOBALEC/ADMD=STERLING/C=US@x400.globalec.com
Date: Fri, 11 Aug 2006 15:17:28 -GMT
Message-ID:
<ZDUB3APP.20068511151728635696131514./S=SERVICE/PRMD=GLOBALEC/ADMD=STERLING/C=US@x400.globalec.com>
Subject: EDI N003057200010001
MIME-Version: 1.0
x-condor: edi
Content-Type: application/x-edi
Content-Transfer-Encoding: base64
Content-Disposition: Attachment; filename="edidata.dat"
Status: RO
X-Status:
X-Keywords:
X-UID: 25565
SVNBKjAwKiAgICAgoCAgICAqMDAqICAgICAgICAgICoxMio4MTIzNzY5MzAyICAgICAqWloq
Q1NJICAgICAfICAgIC***SNIP***RUEqMSowMDAwMDEyMzaF
---END EMAIL PASTE---
Here is the code that I am using which is identical on both systems (a
literal copy/paste)
----BEGIN CODE SNIPET----
For LCV := 0 To AMsg.MessageParts.Count-1 Do
Begin
LastToList.Add(AMSG.Recipients.Items[0].Address);
If (AMsg.MessageParts.Items[LCV] is TidText) Then
Begin
LastBody := LastBody +
(TidText(AMsg.MessageParts.Items[LCV]).Body.Text);
End
Else If (AMsg.MessageParts.Items[LCV] is TidAttachment) Then
Begin
If FileExists('tmp.tst') Then DeleteFile('tmp.tst'); //save wont
overright or apend
TidAttachment(AMsg.MessageParts.Items[LCV]).SaveToFile('tmp.tst');
FileStrings.LoadFromFile('tmp.tst'); //kills entries in the string
LastAttach := LastAttach + FileStrings.Text;
End
End;
----END CODE SNIPET----
Any ideas ?
Thanks!