Send gmime-devel-list mailing list submissions to
To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
You can reach the person managing the list at
When replying, please edit your Subject line so it is more specific
than "Re: Contents of gmime-devel-list digest..."
Today's Topics:
1. Re: gmime-devel-list Digest, Vol 76, Issue 4 (Jeffrey Stedfast)
----------------------------------------------------------------------
Message: 1
Date: Wed, 19 Jul 2017 10:23:56 -0400
Subject: Re: [gmime-devel] gmime-devel-list Digest, Vol 76, Issue 4
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Hi Yuval,
Answers below...
On 7/18/2017 5:12 PM, Yuval Peduel via gmime-devel-list wrote:
> Thank you for the prompt response.
>
> My apologies. I thought I had included that snippet of code. To print
> the encoding I use:
>
> *GMimeContentEncoding encoding =*
> * g_mime_part_get_content_encoding(part);*
> *const char* encoding_as_string =*
> * g_mime_content_encoding_to_string(encoding);*
If the encoding is GMIME_CONTENT_ENCODING_DEFAULT, then the return value
will be NULL.
Since none of your MIME parts in your sample message had a
Content-Transfer-Encoding header, no encoding was specified (which
generally means you should treat it as "8bit").
> *
> *
> *cout << indent << "- content encoding: ";*
> *if (encoding_as_string)*
> * cout << encoding_as_string;*
> * else*
> * cout << "NULL";*
> * cout << endl; *
>
> As for the content_description, I was expecting "text/plain" and
> "text/html". If this is the wrong field to get this discrimination,
> which field would be correct?
No. The g_mime_part_get_content_description() functions returns the
value provided for the Content-Description header (which none of your
MIME parts contained).
If you want the value of the Content-Type header, you need to use
g_mime_object_get_content_type() :)
However, that won't return a string, it will return a GMimeContentType
due to the fact that you typically want to access parameter values.
>
> Related to that (but lower priority), how do I get the
> "multipart/alternative;" field from the multipart? the content type
> from the top level part returned by g_mime_message_get_mime_part(message)?
Yes.
Hope that helps,
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Subject: Digest Footer
_______________________________________________
gmime-devel-list mailing list
------------------------------
End of gmime-devel-list Digest, Vol 76, Issue 6
***********************************************