How to save complete message into string/double headers

Giganews Newsgroups
Subject: How to save complete message into string/double headers
Posted by:  Sabine Dinis Blochberger (no.spam@here.invalid)
Date: Wed, 15 Sep 2004

Using Delphi 7 enterprise with Indy 9 (snapshot from 14th of Sept.
2004).

I want to save the whole message for saveguard into a string (which then
goes into a memo field in a database). The following code gives me that,
*but* the header appears twice in a row.

  // get raw message
  stream := TStringStream.Create('');
  try
    Msg.SaveToStream (stream);
    stream.Position := 0; // go to start
    rawStr := stream.DataString; // get data
  finally
    FreeAndNil (stream);
  end;

NoDecode is false and IsEncoded is true.

Is this a bug/oddity I have to live with, or am I missing anything? Any
hints greatly appreciated.

Regards

--
Dipl. Inform. Sabine Dinis Blochberger (FH)
Op3racional
s.blochberger  @  op3racional.de

Replies