0

I have an e-mail which is made of multiple parts, I parsed it successfully with GMime, but I can't figure out how to decode the Content-Transfer-Encoding: quoted-printable parts.

I saw there are automaton-like functions but I don't know how to use them.

g_mime_encoding_init_decode()

g_mime_encoding_quoted_decode_step()

Does someone know how to do this? My input is a text file containing the message.

Community
  • 1
  • 1

1 Answers1

0

You don't need to use those methods. All you need to do is do:

content = g_mime_part_get_content (part);
g_mime_data_wrapper_write_to_stream (content, output_stream);

At this point, output_stream will contain the decoded content.

jstedfast
  • 35,744
  • 5
  • 97
  • 110