Export (0) Print
Expand All

2.1.3.2.2.3 Reconstructing an Internet Format Message from an Opaque-Signed or Encrypted S/MIME Message Object

To reconstruct a message in the Internet e-mail message format from an opaque-signed message object or an encrypted message object, perform the following steps:

  1. Verify that the Message object contains exactly one Attachment object.

  2. Create an empty MIME entity.

  3. Add any message header fields that result from promotion of the Message object properties, as specified in [MS-OXCMAIL] section 2.1, to the MIME entity.

  4. Add the Content-Type header field, as specified in [RFC2045] section 5, to the MIME entity:

    • If the Message object has a named property "Content-Type" with GUID = PS_INTERNET_HEADERS ({00020386-0000-0000-C000-000000000046}), construct the Content-Type header field by using the value of the named property, assuming that the value can contain unparsed MIME parameters.

    • Otherwise, construct the Content-Typeheader field by using a media type string obtained from the value of the Attachment object's PidTagAttachMimeTag property ([MS-OXPROPS] section 2.593). When doing this, add a name parameter with a value obtained from the PidTagAttachFilename property ([MS-OXPROPS] section 2.584) of the Attachment object.

  5. Add a MIME body with a disposition value "attachment" to the MIME entity; add a single file name parameter with a value obtained from the PidTagAttachFilename property of the Attachment object, encoded if necessary.

  6. Add the Content-Transfer-Encoding header field, as specified in [RFC2045] and with a value of "base64", to the MIME entity.

  7. Read the value of the Attachment object's PidTagAttachDataBinary property ([MS-OXPROPS] section 2.580), and encode the result using base64 encoding. Add the result of the encoding as a body of the MIME entity.

The resulting MIME entity is an opaque-signed message or an encrypted message in its Internet e-mail message format. A client or server can use a different approach as long as it leads to an equivalent result.

Show:
© 2014 Microsoft