diff options
author | June McEnroe <june@causal.agency> | 2020-04-13 17:34:44 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-04-13 17:34:44 -0400 |
commit | d0fd62ac40d972f41d6fc9d59cfce5295c2f4dff (patch) | |
tree | 34f4fb1c244e73e34fa9c2a25abba4a1ec9a102a | |
parent | Fetch multipart body parts (diff) | |
download | bubger-d0fd62ac40d972f41d6fc9d59cfce5295c2f4dff.tar.gz bubger-d0fd62ac40d972f41d6fc9d59cfce5295c2f4dff.zip |
Fetch .TEXT of single-part nested messages
-rw-r--r-- | export.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/export.c b/export.c index 52f6f88..f703e20 100644 --- a/export.c +++ b/export.c @@ -111,13 +111,19 @@ static void exportFetchParts( exportFetchParts(imap, parts, &structure->parts.ptr[i]); parts->len--; } - } else if (structure->message.structure) { + } else if ( + structure->message.structure && + structure->message.structure->multipart + ) { exportFetchParts(imap, parts, structure->message.structure); } else { fprintf(imap, " BODY["); for (size_t i = 0; i < parts->len; ++i) { fprintf(imap, "%s%" PRIu32, (i ? "." : ""), parts->ptr[i].number); } + if (structure->message.structure) { + fprintf(imap, ".TEXT"); + } fprintf(imap, "]"); } } |