ITnef::ExtractProps Problem

T

Teri Delavin

Hi,

I do hope that somebody can guide me and tell me what I am doing wrong. I have been searching the net and tried posting in other forums to no avail.

I am extracting TNEF data from a MIME mail to an MSG file using ITNef::Extractprops. Everything works fine in PC1 (with outlook installed),lets call my MSG here as MSG_A. But if I run my program to PC2 without outlook (installed the MAPI downloadable from MicroSoft instead) it seems my MSG file is missing some bytes (lets call my MSG here as MSG_B), particularly the Recipients and messageBody. Attachments are intact.

On PC2, the property PR_HTML of MSG_B is missing. Recipients property is empty. But getting PR_HTML of MSG_B in PC1, it was able to get it. I download OutlookSpy(thanks Dmitry!) and it reports the following for MSG_B :

PR_HTML -> MAPI_E_UNEXPECTED_TYPE

I've noticed that the part where the properties are somewhat missing after I call the ITNEF::ExtractProps function.

I use Save as Msg function of Outlookspy, the bytes is shortened but the whole msg is displayed perfectly.

MSG_A is perfectly parse on PC2.

Is what I'm doing possible?(Extracting TNEF via ExtractProps in a PC without Outlook installed?) Or I am missing some steps along the way?

Please help :(

Thank you so much!
 
T

Teri Delavin

It occurs to me that I might be asking this question in the wrong forum. Can someone kindly direct me where to post this as I cannot see the appropriate forum for MAPI or win32 messaging.

What I need to accomplished is create an MSG file so that I can put all the TNEF properties in the said MSG file in a PC where outlook is not installed. Is this possible? I was able to create the MSG file using extended MAPI but as I've mentioned in my previous post the html body and the recipients are all missing. Is there additional steps I should do aside from the following:

1. Initialize the MAPI C++ libraries
2. open TNEFStream with the decoded tnf file (OpenStreamOnFile)
3. create compound filefor the storage :):StgCreateStorageEx)
4. Open an IMessage session.:):OpenIMsgSession)
5. Open an IMessage interface on an IStorage object :):OpenIMsgOnIStg)
6. Get the ITnef interface passing the IStream and the output message (OpenTnefStreamEx)
7. extract the properties (ITnef::ExtractProps)
8. Save the MSG file

I know that the body is somewhere in the file because if I open the MSG file using OutlookSpy and use its Save TO MSG function, the newly created MSG file has the body...

Thanks in advance
 
S

SvenC

Hi,

Teri Delavin said:
It occurs to me that I might be asking this question in the wrong forum.
Can someone kindly direct me where to post this as I cannot see the
appropriate forum for MAPI or win32 messaging.

m.p.platformsdk.mapi or m.p.win32.programmer.messaging
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top