Need help with TIDMessage.loadfromStream

Giganews Newsgroups
Subject: Need help with TIDMessage.loadfromStream
Posted by:  Eric Lamer (eric.lam…@phoenixsecure.com)
Date: Wed, 14 Apr 2004

Hi,

  I want to load a message file save from Outlook.  I know that Outlook
does not add the <cr><lf>.<cr><lf> at the end and I would like to know how
to add it to the stream before loading it.

I have the latest dev snapshot of indy 9 (took it a few minutes ago)

procedure TfrmMessageEditor.Button1Click(Sender: TObject);
var
  TempStream : TMemoryStream;
begin
  TempStream := TMemoryStream.Create;
  if OpenDialog1.Execute then
      begin
        TempStream.LoadFromFile(OpenDialog1.FileName);

        *********  HOW DO I ADD THE <cr><lf>.<cr><lf> ****************

        IDMessage.LoadFromStream(tempstream);
      end;
  TempStream.Free;
end;

Thanks.

Replies