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



Hi Jeff,

First of all thank you so much for your fast reply. Really appreciate it.

I have tried with test-parser.c and some other programs available in the tests and examples directories. But it didn't help me to achieve what I am looking for, may be because of my lack of knowledge in this area. I am getting the stream again in the same format (encrypted) after parsing though gmime parser.

I have one attachment as a pdf file (test.pdf) in the mail with some simple text mail message and I can see that pdf is encrypted in the raw format of mail stream what I have once I captured it. Is there anyway to get the test.pdf file back to use it for further processing using some gmime APIs. Will you be able to help me with some more deeper information about how to do that?

If this is not the way how we are getting the attachment for further processing, please help me how to proceed with that?

Thanks
Prasad.


On Wed, Jan 23, 2013 at 5:25 AM, Jeffrey Stedfast <fejj gnome org> wrote:
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]