none
Exact equivalent of MAPISaveMail in Extended MAPI RRS feed

  • Question

  • I am using Outlook 2010

    When I create and save a message using MAPISaveMail, I see the message in the Inbox with

    1) Received (date and  time)

    2) Originators account

    When I do the same with  Extended MAPI (IMAPIProp::SaveChanges)

    I get neither.

    What do I have to do to get the same thing in Extended MAPI.

    Many thanks in advance

    Thursday, June 4, 2015 7:52 AM

Answers

  • You need to explicitly set those (and other) properties. The only property guaranteed to be present is PR_ENTRYID.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by L.HlModerator Wednesday, June 17, 2015 6:12 AM
    Thursday, June 4, 2015 2:13 PM

All replies

  • Hello,

    It is not clear what code you use for creating and setting up the mail item.

    Anyway, you may use any low-level property explorer tool such as MFCMAPI or OutlookSpy for observing properties and find the difference (i.e. properties which should be set additionally).

    Thursday, June 4, 2015 9:05 AM
  • Thanks. I tried OutlookSpy and found out that using Simple MAPI MAPISaveMail my messages get

    PR_CLIENT_SUBMIT_TIME and PR_MESSAGE_DELIVERY_TIME.

    But using Extended MAPI IMAPIProp::SaveChanges my messages get neither.

    Thursday, June 4, 2015 9:35 AM
  • Coder2009,

    When you specify the content of the MapiMessage structure which is an input parameter to MAPISaveMail do you specify a date/time in the lpszDateReceived field and set the MAPI_SENT flag in the flFlags bitmap?


    The reason I ask is that if you wanted the MAPISaveMail message to replicate Extended MAPI you could omit those specifications.
    • Edited by RLWA32 Thursday, June 4, 2015 10:36 AM
    Thursday, June 4, 2015 10:31 AM
  • You need to explicitly set those (and other) properties. The only property guaranteed to be present is PR_ENTRYID.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by L.HlModerator Wednesday, June 17, 2015 6:12 AM
    Thursday, June 4, 2015 2:13 PM