IMAP batch fetch text part of messages
Asked Answered
C

1

6

I'd like to download the text (that is mime type text/plain, text/html text/richtext) from UID x to UID y.

I have the UID's (and not mailbox IDs).

How can I do something like

FETCH 412444:412500 (BODY.PEEK[TEXT/PLAIN OR TEXT/HTML OR TEXT/RICHTEXT])

Thanks!

Curtal answered 3/7, 2010 at 5:37 Comment(1)
did you ever figure this out? downloading just the text?Ethbinium
F
3

After checking RFC3501, the UID command (section 6.4.8) seems to be able to do part of this:

The UID command has two forms. In the first form, it takes as its arguments a COPY, FETCH, or STORE command with arguments appropriate for the associated command. However, the numbers in the sequence set argument are unique identifiers instead of message sequence numbers. Sequence set ranges are permitted, but there is no guarantee that unique identifiers will be contiguous.

Thus, you should be able to call:

UID FETCH 412444:412500 (BODY.PEEK[TEXT/PLAIN OR TEXT/HTML OR TEXT/RICHTEXT])
Frill answered 23/4, 2011 at 13:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.