IMAP FETCH Subject

前端 未结 3 1419
既然无缘
既然无缘 2021-02-14 05:54

Using IMAP via telnet, I want to be able to extract the subject from the specific given email. Now I know that the fetch command is responsible for getting data from an email.

相关标签:
3条回答
  • 2021-02-14 06:26

    I discovered the answer:

    BODY.PEEK[HEADER.FIELDS (SUBJECT)]

    .PEEK tells it not open it (so /seen isn't set).

    0 讨论(0)
  • 2021-02-14 06:34

    "a1 FETCH 1:* (FLAGS BODY[HEADER.FIELDS (SUBJECT DATE FROM)])\r\n"

    0 讨论(0)
  • 2021-02-14 06:34

    Besides BODY.PEEK, you could fetch ENVELOPE, which gives you a parsed summary of much of the message metadata.

    0 讨论(0)
提交回复
热议问题