|Subject:||Re: How to handle different Content-Type's|
|Posted by:||Remy Lebeau (TeamB) (email@example.com)|
|Date:||Mon, 19 Jul 2004|
"Etienne van Tonder" <e…@infoware.com.au> wrote in message
> Currently I am using the following code but it assumes that if
> the content-type does not include multipart it's either text or html.
That is not a correct assumption to make.
> This is not the case as I've discovered as the Content-Type
> can contain many types including "video/x-ms-wmv"
Such types would be interpreted as attachments, not text.
When "multipart/" is not present then check for "text/" instead. The
message may contain just plain text or HTML without any other parts in the
> LogEntry(fpLog, "GetBody: not a multipart message\
> // Get normal text/plain body
> textbody = msg->Body->Text;
You should be checking the ContentType again to make sure it really contains
textual content before assuming that it does.
How to handle different Content-Type's posted by Etienne van Tonder on Mon, 19 Jul 2004