How dows MAPI determines Content-Type for a message RRS feed

  • Question

  • Hi,

    I have a pst file with few messages in it. If I see the properties of the message, I see the following:

    <property id="PR_TRANSPORT_MESSAGE_HEADERS" type="String">
    - <![CDATA[ From: "Paul S. Curry"
    Sender: "SSS. XXX"
    To: "Win7 Outlook2003"
    Subject: test back
    Date: Mon, 1 Mar 2010 15:09:03 -0000
    Message-ID: <AF76BF2FA775724A9C4E55E51BAEF79D24E10801@win2kExch03-1.pctest.internal>
    MIME-Version: 1.0
    Content-Type: text/plain;
    Content-Transfer-Encoding: 7bit
    X-Mailer: Microsoft Outlook 14.0
    Thread-Index: AQD2Fiu5KbYKDRISD84BwlJnmU0/VQ==
    Content-Language: en-us


    <property id="PR_RTF_COMPRESSED" type="Binary">
    - <![CDATA[ {\rtf1\ansi\ansicpg1252\fromhtml1 \deff0{\fonttbl
    {\f0\fswiss Arial;}
    {\f1\fmodern Courier New;}
    {\f2\fnil\fcharset2 Symbol;}
    {\f3\fmodern\fcharset0 Courier New;}
    {\f4\fswiss\fcharset0 Arial;}}
    \uc1\pard\plain\deftab360 \f0\fs24 
    {\*\htmltag3 \par }}

    My understanding is that since PR_RTF_COMPRESSED contains fromhtml1, the content type should be text/html. However, if I save this message using MAPI, it comes out as text/plain.

    I suspected that it might be taking it from the PR_TRANSPORT_HEADERS, but even if I modify that in the PST (using MFCMAPI), I still get text/plain.

    So, which property does MAPI looks for when determining the Content-Type?


    Thursday, February 14, 2013 3:40 PM


  • If PR_RTF_COMPRESSED was teh lats body property set, Outlook best body algorithms breaks and thinks that RTF is the format. Try to make sure PR_HTML property is the last one to be set.

    Dmitry Streblechenko (MVP)
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Thursday, February 14, 2013 4:20 PM