curl / Mailing Lists / curl-library / Single Mail


Question about imap_perform_fetch

From: kinglt <>
Date: Sun, 06 May 2018 16:41:20 +0800


On Sat reply of Question about CURLOPT_CUSTOMREQUEST in IMAP program ,
suggest using
"imap://;UID=3/;SECTION=TEXT" -
Selects the user's inbox and fetches the text portion of message 3".

I tried this, but got wrong result. When using uid it failured with
"email not exist", but give message sequence number it succeed. This
confused me. By RFC 5092, imap url "/;UID=xx" surely should be uid, not
sequence number.
I tried to learn how libcurl source code does. In lib/imap.c
imap_perform_fetch() maybe the function i guess. Line 695, 700 show the
command string "FETCH ...", not "UID FETCH ...". 
Is it the reason?

Thanks for your help.

Received on 2018-05-06