Closed feddoa closed 1 year ago
The following code snippet is the correct way to check for this:
GMimeContentType *content_type;
content_type = g_mime_object_get_content_type ((GMimeObject *) part);
if (g_mime_content_type_is_mime_type (content_type, "text", "plain")) {
// this is text/plain
} else if (g_mime_content_type_is_type (content_type, "text", "html")) {
// this is text/html
} else if (g_mime_content_type_is_type (content_type, "text", "*")) {
// this matches all text mime-types
}
Thank you!
I am working on antispam project with gmime lib. I need to get text/plain and text/html parts from message, i've done it with this code:
I cant realize how to detect which type this text part is(text/plain or text/html) I thought there is something like g_mime_text_part_get_type but I`ve found this function with empty args list. I would be glad if u give an advice