Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIdMessage.LoadFromStream: Missing fields
#1
I use the IMAP system to dowload an email.
MSG: TIdMessage;
IMAP: TIdIMAP4;

I then call  IMAP.UIDRetrieve(IntToStr(IMAP.MailBox.SearchResult[i]), MSG);
I can now read all fields like From, Subject etc. fine.

Then the entire email is loaded into a Stream using
IMAP.UIDRetrieveNoDecodeToStream(IntToStr(IMAP.MailBox.SearchResult[i]), AStream);

This Stream is then saved to file, as an .eml file.
I can load this file with an email program fine, all data complete.

The same Stream is internally kept.
But when I afterwards use an IdMessage.LoadFromStream, all fields like From, Subject, etc. are all empty.
The LoadFromStream does not seem to initialize the fields.

It seems only the IMAP does this, during the call to IMAP.UIDRetrieve.

How do I get my data back in the TIdMessage after a LoadFromStream?
---
Bart Kindt
CEO and Developer
SARTrack Limited
New Zealand
www.sartrack.nz
Reply


Messages In This Thread
TIdMessage.LoadFromStream: Missing fields - by BartKindt - 03-06-2023, 10:29 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)