idMessage x 2

Giganews Newsgroups
Subject: idMessage x 2
Posted by:  Mark (newsgrou…@connect2server.net)
Date: Wed, 7 Jan 2004

Hi all

I have an app that receives a message into idMessageSource, then I
iterate through the specific details and copy them to idMessageDest so
that I can resend.  Kind of like an autoresponder but with a difference.

What is the correct way of doing this...

idMessageSource:=TidMessage.create(nil);
idMessageDest:=Tidmessage.Create(nil);

idMessageSource.LoadFromStream(fsRaw);

[snip]
Create body of idMessageDest, including file attachments
[snip]

idMessageDest.Recipients:=idMessageSource.Recipients;  << problem part

[snip]
idSMTP1.send(idMessageDest);

idMessageDest.Free;
idMessageSource.Free;  <<<< AV here cos recipients has just been freed

Mark.

Replies