Re: Message in a Message II

Giganews Newsgroups
Subject: Re: Message in a Message II
Posted by:  Remy Lebeau \(Indy Team\) (
Date: Tue, 18 Dec 2007

"John Siggy" <jsigolo…> wrote in message

> Thanks for the suggestion

For future reference, you should always reply to the orginal thread, not
start a new thread.

> in Indy 9.19

That is a very old version of Indy 9.  The current snapshot is 9.0.50.

> a message attached to a message does not show up as an attachment.

Then Indy 9 can't parse the message data.  Which is not surprising, as Indy
9 does not support nested MIME parts very well.

Try upgrading to Indy 10.

> The attached msg shows as TIdText and I can't figure out how to
> get the zip file out of this message in a message.

You have to save the TIdText data to a file or TStream, and then load that
into TIdMessage as a new message, like I told you earlier.

> TIdAttachment(IdMessage.MessageParts.Items[fAttach]).SaveToFile('XX.MSG')
>                    >> blows up <<

Of couse it does.  You are casting a TIdText to a TIdAttachment.  You can't
do that, as TIdText is not a TIdAttachment.  The TIdText.Body property is a
TStrings, which has its own set of SaveTo...() methods, ie:





In response to

Message in a Message II posted by John Siggy on Tue, 18 Dec 2007