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.


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


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?


Received on 2021-12-16