Re: TIdMessage: capable of reading outlook generated msg-files?

Giganews Newsgroups
Subject: Re: TIdMessage: capable of reading outlook generated msg-files?
Posted by:  Remy Lebeau \(Indy Team\) (no.spam@no.spam.com)
Date: Tue, 6 Mar 2007

"koen" <ko…@ha.com> wrote in message
news:Xns98EBB2B609923koenhac…@87.106.16.84...

> is a TIdMessage-component able to read a msg-file created by
outlook?

No, because .msg files are not text files.  Only .eml files can be
used with TIdMessage.  In order to work with .msg files, you will have
to use Microsoft's Compound Storage API instead, specifically the
StgOpenStorage/Ex() function and the IStorage and IStream interfaces.

> When I try to load a msg-file, the Body seems to be partially
> loaded into the component, and the sender, date or subject
> is not read.

Correct, because .msg are not in the standardized textual email format
to begin with.  Indy does not implement support for .msg files at all.

> Isn't this possible using Indy

Not with .msg files, no.

> do you have to do something else then just calling
> Message->LoadFromFile ();

Yes.  See above.

Gambit

Replies

None

In response to

TIdMessage: capable of reading outlook generated msg-files? posted by koen on Tue, 6 Mar 2007