On Wed, 2009-03-11 at 23:21 +0800, [email protected] wrote:
> > > I received an email where the sender attached a Sent Item. This 
> > > attachment is an embedded 
> > > message, I open it with GetEmbeddedMessage and then I treat the returned 
> > > object like any
> > > other message object. Since it is a Sent Item, it doesn't have any 
> > > header, so I need to read
> > > the recipients from the a table returned by GetRecipientsTable. However, 
> > > that fails with
> > > MAPI_E_NOT_INITIALIZED. Could there be something missing in 
> > > GetEmbeddedMessage?
> > 
> > Can you try r1284 and tell me if it matches your expectation?
> 
> Thank you very much, Julien.
> 
> The test case that I had now works as expected. I do get a recipients table 
> and I
> can get data for PR_SMTP_ADDRESS and PR_RECIPIENTS_TYPE as expected.
> 
> However, I'm back to one of my newbie problems. I cannot get the recipients 
> name. Both
> PR_RECIPIENT_DISPLAY_NAME and PR_DISPLAY_NAME return only null strings. Does 
> this mean that
> these tags aren't available in this data structure, that the server has no 
> information
> for this or am I doing something wrong? I don't know. I'm using 
> octool_get_propval in the
> same way as with the other two tags. My test case does show display names and 
> email addresses 
> when I open it in OWA.

GetRecipientTable is only a client-side call which fully relies/build
data based on information returned by GetEmbeddedMessage or OpenMessage
etc. (depending on the context). The information these calls return are
described as part of MS-OXCDATA specifications for RecipientRow
structure (2.10.3.2 RecipientRow).

If the information you are looking for is not available/returned by
GetRecipientTable (or available in OpenEmbeddedMessage at "network
trace" level), the best I can suggest would be to call ResolveNames
function and specify the set of properties you're looking for.

For example, mapitest returns the following information for
OpenEmbeddedMessage test:

[*] OXCMSG-OPEN-EMBEDDED-MESSAGE
[TEST] OXCMSG-OPEN-EMBEDDED-MESSAGE
------------------------------------------------------------------------
        * SaveChangesMessage                 : 0x00000000
        * CreateAttach                       : 0x00000000
        * SetProps                           : 0x00000000
        * OpenEmbeddedMessage                : 0x00000000
        * SaveChangesMessage                 : 0x00000000
        * SaveChangesAttachment              : 0x00000000
        * SaveChangesMessage                 : 0x00000000
        * OpenAttach                         : 0x00000000
        * OpenEmbeddedMessage                : 0x00000000
        * GetRecipientTable                  : 0x00000000
         * PR_OBJECT_TYPE: 6
         * PR_DISPLAY_TYPE: 0
         * PR_7BIT_DISPLAY_NAME: jkerihuel
         * PR_SMTP_ADDRESS: [email protected]
         * PR_RECIPIENT_TYPE: 1
         * PR_INTERNET_CPID: 1252
        * DeleteMessage                      : 0x00000000
------------------------------------------------------------------------
[RESULT] OXCMSG-OPEN-EMBEDDED-MESSAGE: [SUCCESS]
========================================================================


Cheers,
Julien.

---
Julien Kerihuel
[email protected]
OpenChange Project Manager

GPG Fingerprint: 0B55 783D A781 6329 108A  B609 7EF6 FE11 A35F 1F79


Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
devel mailing list
[email protected]
http://mailman.openchange.org/listinfo/devel

Reply via email to