 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
tvdeyen Guest
|
Posted: Fri Aug 11, 2006 7:39 pm Post subject: Corrupt zip file attachments |
|
|
Hi,
I have an application that uses the indy TIdPop3 to receive mails
containing an attached zip-file, but the problem is that it appear to
be corrupt. If I receive the mail using outlook etc. the attached zip
is ok. It has been working for month but suddently it has stop working
:-s
This is what i do:
....
with popMails do
begin
....
count := CheckMessages;
for i:=1 to count do
begin
Msg.Clear;
RetrieveHeader(i,Msg);
....
Retrieve(i, Msg);
for j := 0 to Pred(Msg.MessageParts.Count) do
begin
try
if (Msg.MessageParts.Items[j] is TIdAttachment)
then
begin
filename :=
TIdAttachment(Msg.MessageParts.Items[j]).Filename;
TIdAttachment(Msg.MessageParts.Items[j]).SaveToFile(DataDir+filename);
....
unzip the attach file if it is a zip file
....
I tried it with indy 9 and indy 10 (using
TIdAttachementFile/TIdAttachementMemory instead) and the zip file is
corrupt both solutions....
I compared the zip-file that was received using indy with the one i got
from outlook, and it is the very last 10 characters that differes...
seems to be a null-termination that has sneaked into the end of the and
the then UU encoding delivering the wrong results for the last
characters in the file...
.... has also seen a null-termination appearing when the zip-file is
empty = corrupt
Has anyone experienced the same? Am I doing anything wrong here? any
feedback is appreciated... Thanks
best regards,
Torben |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|