From IMessage, how to tell what format the body is in?

  • Thread starter Richard Lewis Haggard
  • Start date
R

Richard Lewis Haggard

When a new email is created, there is a combo that allows a user to select
Text, HTML or Rich Text. Is there a way to tell using the IMessage interface
what the user's choice was?

Here's why I need to know. My C++ software uses the IMessage interface to
extract the various bits and pieces of an email message, perform all kinds of
magic on it but the exact nature of the processing depends on what format the
body of the email is in. Up until now, the code simply tried various formats
of decreasing complexity until it found one. First it went for Rich Text by
using OpenProperty( PR_RTF_COMPRESSED (etc) ) to get the body in Rich Text.
If that failed then it tried getting the body in HTML format by making use of
CMAPIPropValue's GetOnePropFromMAPIObject( IMessage*, PR_HTML ) function. As
a last resort, it defaults to TEXT. A programmer who is more experienced in
SMTP processing than I suggested that it is possible for Rich Text or HTML
formats to simultaneously exist but only one of the formats actually have any
data. While I haven't seen this, I respect what he says and it is only
prudent that I code accordingly. Since it can be a bit of a bother coding up
a bulletproof means for determining the amount of real content in any of
these formats, I was hoping that there was some way to tell which option the
user originally chose to format the email in back when he created it.

Thanks!
 

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