Save Message to MSG Compound File Doesn't Work With S/MIME Messages

Z

zippy

Has anybody tried the code in Microsoft Knowledge Base Article -
171907 with Native Microsoft S/MIME messages (IPM.Note.SMIME,
IPM.Note.SMIME.MultipartSigned)?

The code is here:

<http://support.microsoft.com/defaul...port/kb/articles/q171/9/07.asp&NoWebContent=1>

This code works great with messages of any message class except those
allocated to Native Microsoft S/MIME messages. The CopyTo call
returns MAPI_E_CALL_FAILED.

I am using this code in OnWriteComplete to save attached S/MIME
messages to a file when a user clicks "Send".

I tried changing the message class right before the CopyTo call to
something else, but CopyTo still fails. However, if I use
OnSelectionChange to successfully change the message class to
something else before OnWriteComplete is called, then the CopyTo in
OnWriteComplete works fine. The message is otherwise exactly the same
as the one that failed with the S/MIME message class.

Has anybody encountered this? Has anybody found a workaround for
this?

Thanks,
-zip
 
D

Dmitry Streblechenko

IMessage returned by Outlook to an Exchange Client Extension is not a native
IMessage implemented by a message store provider, but Outlook's own wrapper
sitting on top of the native message. The wrapper is notoriously buggy.
The wrapper presents the original encrypted message in a decrypted form
(e.g. it does not have p7m attachment).
The only workaround I am aware of is to copy the message property by
property.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

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