Get the Gmail attachment filename without downloading it

后端 未结 4 1980
有刺的猬
有刺的猬 2020-12-31 09:56

I\'m trying to get all the messages from a Gmail account that may contain some large attachments (about 30MB). I just need the names, not the whole files. I found a piece of

4条回答
  •  悲哀的现实
    2020-12-31 10:42

    A FETCH of the RFC822 message data item is functionally equivalent to BODY[]. IMAP4 supports other message data items, listed in section 6.4.5 of RFC 3501.

    Try requesting a different set of message data items to get just the information that you need. For example, you could try RFC822.HEADER or maybe BODY.PEEK[MIME].

提交回复
热议问题