none
How to send signed email using MAPI? RRS feed

Answers

  • Hi Bin,

    The layout of a S/MIME MAPI message is documented in the protocol document below.

    [MS-OXOSMIME]: S/MIME Email Object Algorithm

    http://msdn.microsoft.com/en-us/library/cc433474(v=exchg.80).aspx

    Please review the document to see if it answers you questions.

    Regards,

    Dave


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members.
    • Marked as answer by bin lin Tuesday, August 6, 2013 1:47 PM
    Wednesday, July 31, 2013 7:13 PM
  • Hi Bin,

    There is no direct API that can create a S/MIME mail message.  Here are some of your options:

    1. If you want to create the S/MIME message as a RFC 2822 / S/MIME message you can use this KB to create it:

    How to send digitally signed messages by using CDOSYS/CDOEX

    http://support.microsoft.com/kb/280391/en-us

    How To Create a Multipart SMIME Signature by Using CAPICOM and CDO

    http://support.microsoft.com/kb/318215/en-us

    Additionally, if this is a client application you may be able to utilize the MIME to MAPI APIs within Outlook to convert it to its MAPI based representation.  However, you should not use this approach if it is a service application or a server side application.

    About the MAPI-MIME Conversion API

    http://msdn.microsoft.com/en-us/library/bb905127(v=office.12).aspx

    2. Use MAPI to build the message as prescribed in the document I already provided.

    Dave


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members.


    Thursday, August 1, 2013 2:46 PM

All replies

  • Hi Bin,

    I will consult my colleagues on this question and it will take some time. Your patience will be greatly appreciated.

    Regards,
    Jeffrey


    Jeffrey Chen
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, July 31, 2013 12:28 PM
    Moderator
  • Hi Bin,

    The layout of a S/MIME MAPI message is documented in the protocol document below.

    [MS-OXOSMIME]: S/MIME Email Object Algorithm

    http://msdn.microsoft.com/en-us/library/cc433474(v=exchg.80).aspx

    Please review the document to see if it answers you questions.

    Regards,

    Dave


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members.
    • Marked as answer by bin lin Tuesday, August 6, 2013 1:47 PM
    Wednesday, July 31, 2013 7:13 PM
  • Is there any API that can help creating S/MIME message object?  Do I have to create smime.p7m by hand and attach to IMessage?  If I do, how do I create smime.p7m out of an IMessage object?


    Bin

    Thursday, August 1, 2013 1:51 PM
  • Hi Bin,

    There is no direct API that can create a S/MIME mail message.  Here are some of your options:

    1. If you want to create the S/MIME message as a RFC 2822 / S/MIME message you can use this KB to create it:

    How to send digitally signed messages by using CDOSYS/CDOEX

    http://support.microsoft.com/kb/280391/en-us

    How To Create a Multipart SMIME Signature by Using CAPICOM and CDO

    http://support.microsoft.com/kb/318215/en-us

    Additionally, if this is a client application you may be able to utilize the MIME to MAPI APIs within Outlook to convert it to its MAPI based representation.  However, you should not use this approach if it is a service application or a server side application.

    About the MAPI-MIME Conversion API

    http://msdn.microsoft.com/en-us/library/bb905127(v=office.12).aspx

    2. Use MAPI to build the message as prescribed in the document I already provided.

    Dave


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members.


    Thursday, August 1, 2013 2:46 PM
  • Is there another API to convert MAPI IMessage to MIME stream?  Or is the a way to get message headers and bod from IMessage which can be used to build MIME?

    Bin

    Friday, August 2, 2013 8:21 PM
  • Hi Bin,

    If this is a client application you may be able to utilize the MIME to MAPI APIs within Outlook to convert between MIME to MAPI and MAPI to MIME.  However, you should not use this approach if it is a service application or a server side application.

    About the MAPI-MIME Conversion API

    http://msdn.microsoft.com/en-us/library/bb905127(v=office.12).aspx

    If this is a service application or a server side application there is no direct API to do this conversion.  You will need to use the protocol documents to convert it yourself.

    [MS-OXCMAIL]: RFC 2822 and MIME to Email Object Conversion Algorithm

    http://msdn.microsoft.com/en-us/library/cc463915(v=exchg.80).aspx

    Dave

    Friday, August 2, 2013 8:34 PM