mailclient demo using 9.0.14

Giganews Newsgroups
Subject: mailclient demo using 9.0.14
Posted by:  Tom Livingstone (tdlivin…@comcast.net)
Date: Fri, 14 Nov 2003

I added Msg.SaveToFile in the RetrieveExecute procedure of the mailclient
demo
in order to look at the raw mime message in an earlier version of Indy 9 and
it
worked fine. I upgraded to 9.0.14 and now I get an access violation in the
Msg.SaveToFile method.

  The lines with //Added were inserted to save the rawmessage text and show
what
  was being decoded for the Body.

  ShowStatus(stTemp);
  Msg.SaveToFile('RawMsgtxt.txt',False);  //Added
  Memo1.Lines.Add('--------------BODY-------------'); //Added
  Memo1.Lines.AddStrings(Msg.Body); //Added
  Showbusy(false);

Single stepping with the debugger it throws the access violation in
TidMessage.SaveToFile as shown

  vStream := TFileStream.create(AFileName, fmCreate);
  try
    SaveToStream(vStream, AHeadersOnly);
  finally
    vStream.Free;  <<-- Access Violation when executed.
  end;

I am using Delphi 5 and I deleted all the dcu files in the D5 folder and all
files from the /source folder and removed
the indy components from the pallette before installing the new version.

Tom

Replies