none
Digitally Signed email messages does not contain PR_BODY property RRS feed

  • Question

  • Getting PR_BODY property on a signed email returns property not found error if don't check "Send clear text signed message when sending signed messages".  If I check the option, I can retrieve PR_BODY property of the message body.  What is the problem and how can I fix it?  Thanks.

    HRESULT hr = _message->OpenProperty(PR_BODY, &IID_IStream, STGM_READ, 0, (IUnknown**)&iStream);


    Bin

    Saturday, July 27, 2013 5:26 PM

Answers

  • When you click the IMessage button, OutlookSpy reads the MAPIOBJECT property from the selected message, and Outlook goes as far as furnishing a fake IMessage object when it tries to represent a signed/encrypted message as a regular IPM.Note message.

    You can see the raw message if you click the IMAPISecureMessage button, then click GetBaseMessage.

    Or you can right-click on the PR_ENTRYID property and select IMAPISession::OpenEntry.

    Or open the message from the parent folder - click IMAPIFolder, go to the GetContentsTable tab, double click on the message.


    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 bin lin Monday, July 29, 2013 3:41 PM
    Monday, July 29, 2013 2:17 PM

All replies

  • Signed/encrypted messages store the message body and attachments in the p7m attachment.

    If you are using Extended MAPI, it is your responsibility to process the p7m attachment.

    Outlook Object Model always represents such messages as regular IPM.Note MailItem objects.


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

    • Proposed as answer by jackafx Sunday, July 28, 2013 2:23 AM
    Saturday, July 27, 2013 5:56 PM
  • How come OutlookSpy shows the message having PR_BODY?  And IsSigned property (0x846A000B) is false.  So how do I know if the message is signed?  Do I check if the attachment is smime.p7m?

    Thanks


    Bin

    Monday, July 29, 2013 2:04 PM
  • When you click the IMessage button, OutlookSpy reads the MAPIOBJECT property from the selected message, and Outlook goes as far as furnishing a fake IMessage object when it tries to represent a signed/encrypted message as a regular IPM.Note message.

    You can see the raw message if you click the IMAPISecureMessage button, then click GetBaseMessage.

    Or you can right-click on the PR_ENTRYID property and select IMAPISession::OpenEntry.

    Or open the message from the parent folder - click IMAPIFolder, go to the GetContentsTable tab, double click on the message.


    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 bin lin Monday, July 29, 2013 3:41 PM
    Monday, July 29, 2013 2:17 PM
  • How do I get IMessage object from the base IMessage which is IPM.Note.SMIME?


    Bin


    • Edited by bin lin Monday, July 29, 2013 3:23 PM typo
    Monday, July 29, 2013 3:22 PM
  • You can't do that in MAPI because no such IPM.Note message physically exists.

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

    Monday, July 29, 2013 3:24 PM