curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

IMAP and BODY.PEEK

From: Christian Schmitz via curl-library <curl-library_at_lists.haxx.se>
Date: Thu, 16 Dec 2021 19:26:13 +0100

Hello,

CURL has built-in way to do a FETCH for an email, but it uses "UID FETCH %s BODY[%s]", which marks email as read.

If we change this to BODY.PEEK, we would get the email content without the mark as read.

Now if I use a custom command to do this, I get a different state and the email is in the debug messages instead of the result.
That is because we never get to IMAP_FETCH state.

Could we have an option to have imap_perform_fetch use BODY.PEEK with some new option?
Like UID or MAILINDEX, this could be something in the URL as Parameter.

What do others think? Could this work?

Sincerely
Christian


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2021-12-16