Closed Jeevhi closed 4 years ago
After g_mime_part_iter_new (mime) - the g_mime_part_iter_get_current() will return the first part of the multipart.
Once you call g_mime_part_iter_next(), it iterates to the next part, which is the html part.
TL;DR
You need to use a do-while loop, not a while loop.
I am using gmime to decode the message body. I am not sure if it's a bug or that's how it should be, but I am unable to retrieve plain part from the message body. The Iterator only returns one part ( html part) even though both parts are present in the message. However, if the context type is multipart/mixed (with attachment), Iterator returns all the parts (plain, html, attachment).
Below is the multipart-message