BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Corrupt zip file attachments

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools
View previous topic :: View next topic  
Author Message
tvdeyen
Guest





PostPosted: Fri Aug 11, 2006 7:39 pm    Post subject: Corrupt zip file attachments Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.