Re: [gmime-devel] What's the preferred way to retrieve message body?



Title: What's the preferred way to retrieve message body?
On 01/21/2010 12:03 PM, Junping Zhang wrote:

Hi, there,

  Since g_mime_message_get_body is deprecated, what's the sequence of functions that should be used to retrieve message body from GMimeMessage?


FWIW, g_mime_message_get_body() was never meant to be publicly consumed (shame on me for exposing it). It was really only meant to be used in test-parser.c (why I didn't just put it in test-parser.c, I don't know).

The problem with g_mime_message_get_body() is that it made a lot of assumptions about the structure of the message (meaning it was pretty naive). Because of this, it wouldn't properly work on all messages.

With 2.4, I decided since the API was changing anyway that it was a good time to drop it (and also because the old implementation depended on behavior that no longer existed, so it would have had to have been rewritten a bit).

If you are implementing a mail-client, you should probably display all parts that the client is capable of rendering that are marked 'inline' (with a few exceptions - such as you should only render 1 subpart of a multipart/alternative - choosing the most appropriate part based on your rendering capabilities and/or possibly user-preference).

Hope that explains things a bit,

Jeff



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]