Re: reloading saved messages

Giganews Newsgroups
Subject: Re: reloading saved messages
Posted by:  Ciaran Costelloe (ccostell…@flogas.ie)
Date: Mon, 19 Jul 2004

"Terry Flanagan" <tflanag…@copia.com> wrote in message
news:F707198274A5E240tflanag…@copia.com...
> I am using the Indy package that came with D7 (slightly modified to get
> content ID). I believe it's version 9.00.10. If I save a a message using
the
> TIdMessage.SaveToFile method and then reload the message using
LoadFromFile,
> I get a different number of message parts and content types. For example,
if
> I send a message from Outlook using an embedded image in HTML (MHTML) I
get
> 4 message parts when first receiving the message - multipart/alternative,
> text/plain, text/htnl, and the embedded image as an attachment. If I save
> the message and then load it from file I get two message parts, both
> multipart/alternative.
>
> How do I get the saved message to parse into the same parts when reloading
> it from file?

You should upgrade to Indy 10, there are too many cases where you will hit
this problem in Indy 9.  Indy 10 uses a totally different method of parsing.

Otherwise, what may get you sorted is to keep the message in "raw" format
when pulling it down, saving it "raw" to disk (try out the
TIdMessage.NoDecode and NoEncode), and then always read it from the disk
file, decoding it at that stage.  Messy, but consistent.

Ciaran

Replies

In response to

reloading saved messages posted by Terry Flanagan on Mon, 19 Jul 2004