Board index » delphi » Indy : POP SavetoFile/Loadfromfile problem

Indy : POP SavetoFile/Loadfromfile problem

I use TIdPOP3 to load in a series of messages from a POP
Something like this

 POP.Retrieve(I, Msg); //get message and put it in MSG
 Msg.SaveToFile(Somefilename); // save to tmp for processing

and so on. Works fine. I set POP.NoDecode= TRUE  so that the whole
message comes in as 'text'. The problem is, SaveToFile does not save as
text, but as a stream. But ok, can live with that.

I now want to load this message into a viewer (I am using the MailDemo
from the Indy pack as a start).

The message loads in ok - if there is no attachment

   From.Caption := Msg.From.Text;
   Recipients.Caption := Msg.Recipients.EmailAddresses;
   Cc.Caption := Msg.CCList.EMailAddresses;

etc...just as in the demo

The Msg.body part loads ok. When there is an attachment, it is visible
in the body as MIME text. Not a problem. It would be nice to actually
show the attachments in the separate Listview as you do in the demo.

So I tried changing the POP.NoDecode = FALSE. This loads the message
down from the server ok, and saves it. But when I try to view the
message, I get the error message

"Error reading Mdg.Parts: Error reading TIdText.Body.Strings: Invalid
property path"

And then it crashes out.

This happens on this line -


It seems that you cannot use Loadfromfile if you use SavetoFile with

Any ideas?


Re:Indy : POP SavetoFile/Loadfromfile problem

Again, please see the previous replies since I think all this is about the
same issue.:

From: Kerry Neighbour <>
Newsgroups: borland.public.delphi.internet.winsock
Subject: Indy - POP3 --> SMTP problems

Other Threads