cURL / Mailing Lists / curl-users / Single Mail

curl-users

According to documentation equivalent IMAP related commands do not behaviour equivalent

From: Sławomir Gonet <gonet9_at_gmail.com>
Date: Thu, 22 Aug 2013 09:39:03 +0200

Hey.

Just a simple question:

According to: http://curl.haxx.se/mail/lib-2013-03/0104.html:
> As well as using the URL syntax to fetch a message it is also possible
> to use the custom request mechanism to perform custom FETCH operations as
> well. For example
>
> --url imap:// mail.example.com/INBOX -X "'FETCH 1 BODY[TEXT]" will
> perform the same operation as
> --url imap:// mail.example.com/INBOX/;UID=1/;SECTION=TEXT

So, let's try:
$ curl 'imaps://imap.gmail.com:993/INBOX' -u foo_at_gmail.com:bar -X 'FETCH 1 BODY[TEXT]'
* 1 FETCH (BODY[TEXT] {750}
$ curl 'imaps://imap.gmail.com:993/INBOX/;UID=1/;SECTION=TEXT' -u foo_at_gmail.com:bar
--047d7bd6a8ceb8d4c304de253d71
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<and message contents here>

So something is wrong.

Another question is how can I fetch message contents by its UID, not
sequence number?

Thanks for replies and best regards,
Slawek

-- 
SG
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-08-22