Re: [gmime-devel] Need code snippet for MIME decoding



Hi Prasad,

There are some sample programs included in the gmime source code that show you how to do what you want (look in the examples directory and/or look at tests/test-parser.c).

Functions like g_mime_message_get_subject() return UTF-8.

GMime also includes functions such as g_mime_iconv*() which will convert between charsets if you need them.

Hope that helps,

Jeff

On 1/22/2013 5:38 AM, Prasad Antony M wrote:
Hi,

I have a complete mail in raw format.
Mail can contain multiple attachments too.
In the mail either headers or message body/attachment
or both will be in encrypted format (usually base64).

Does anyone has code snippet to decode
this complete mail contents where ever is
required using gmime,
and give each and every mail contents (subject, From, To etc
and actual message and attachments)
in separate variables (in case of headers) or
arrays (in case of message body and attachments),
those I can use to process further.

I would like to get message body and attachments
in separate arrays.
Also is there any code which is handling
the UTF-8 character sets too?

Thanks In Advance
Prasad Antony

_______________________________________________
gmime-devel-list mailing list
gmime-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gmime-devel-list




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