🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages Started by Koen Mon, 12 Mar 2007 16:29
Retrieve Date from outlook msg-file
#2305
Author: Koen
Date: Mon, 12 Mar 2007 16:29
17 lines
1346 bytes
Hi,

I am trying to read the contents of an outlook msg-file on disk. I do this 
by using the StgOpenStorage to create an IStorage interface, and then using 
OpenStream/OpenStorage to read the properties. (As adviced by Gambit in 
atozedsoftware.indy.general)
This seems to work properly, and I can retrieve the Sender/Subject/Body/... 
of the email. However I am not able to find the date when the email is 
sent. None of the Streams in the storage have the PT_SYSTIME datatype, and 
none have a "Time-tag" as defined in mapitags.h (for example 
PR_CLIENT_SUBMIT_TIME).
But when I open the msg-file in Outlook, the date the email is sent is 
shown. How can I retrieve this date?

regards,

Koen
Re: Retrieve Date from outlook msg-file
#2308
Author: Remy Lebeau (TeamB)
Date: Mon, 12 Mar 2007 17:41
17 lines
1558 bytes
"Koen" <koen@ha.com> wrote in message
news:Xns98F1A7F081730koenhacom@207.105.83.66...

> None of the Streams in the storage have the PT_SYSTIME datatype,
> and none have a "Time-tag" as defined in mapitags.h (for example
> PR_CLIENT_SUBMIT_TIME).
> But when I open the msg-file in Outlook, the date the email
> is sent is shown. How can I retrieve this date?

Soundsl like you are not looking at the actual message data that was
downloaded, only at the stream tags that wrap the data.  You need to
find the stream that contains the original message headers and then
grab the date/time from that data.


Gambit
Re: Retrieve Date from outlook msg-file
#2328
Author: Koen
Date: Tue, 13 Mar 2007 08:53
29 lines
1952 bytes
Remy Lebeau (TeamB) wrote:

> 
> 
> Soundsl like you are not looking at the actual message data that was
> downloaded, only at the stream tags that wrap the data.  You need to
> find the stream that contains the original message headers and then
> grab the date/time from that data.
> 


Thanks for the info. I have found out that some of the messages indeed 
contain a stream with the original message headers (the type is 
PR_TRANSPORT_MESSAGE_HEADERS). However, internally, we use an Exchange-
server, and an internal mail does not contain that stream. Is there any way 
I can retrieve the date in that case?  
I have found a stream with PR_MESSAGE_SUBMISSION_ID as type, and the 
contents seams to contain the date: 
c=BE;a= ;p=Exchange;l=W2003EX-070306151740Z-1672
but I'm not sure it always contains it.

I have another question: to know the type of the message I have to parse 
the pwcsName-member of the tagSTATSTG structure (Take the 8 last characters 
to read a hex-number). There doesn't seem to be a member to define the 
type. Is this the correct way or am I something missing?

regards,

Koen
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads