cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: trying to list all message subjects in my inbox using cURL and an imaps url

From: Stephen Jarjoura <steve_at_runester.com>
Date: Fri, 25 Apr 2014 17:32:20 -0400

On Thu, Apr 24, 2014 at 4:06 PM, Steve Holme <steve_holme_at_hotmail.com> wrote:

> Are you simply trying to obtain a list of subject lines for all the messages
> in the Inbox or are you wanting to do other things as well as you gave a few
> different examples - so I started to get a little lost with what you are
> trying to achieve :(
>

My initial goal was to try and get a list of subjects of messages in
an Inbox. But while I tried different iterations of the URL and
parameters, I kept getting the same sort of results. cURL returns the
first line the server responds with, which is an echo of the command
submitted, with a byte count on the end. It does not return any of the
subsequent lines that the server sends, which are visible with the
verbose flag. While my initial goal was to see a list of subjects, I
noticed that despite the documentation, I never did get a listing of
email messages, etc.

>> This website: http://curl.haxx.se/mail/lib-2010-06/0019.html
>> reports that "Download all email in INBOX for this user with IMAP:
>> imap://user:password_at_mail.candelatech.com/INBOX?ALL"
>>
>> But that doesn't work for me, either.
>
> Unfortunately, and this is before my involvement with curl, but I believe
> that was Ben's own fork and I must admit I haven't looked at his work there
> :(
>
> The query string isn't something that is currently supported in v7.36.0,
> however, I have added basic support for it in v7.37.0 - as of commit
> 84c0aabe65 in the repo.
>
> However, I would be interested to know what you are expecting such a URL to
> do? For example: return a list of messages that match the query string or
> fetch those messages as well as I may need to expand that support?
>
> I appreciate with that URL Ben's example downloaded all messages but that
> syntax isn't (as far as I know) mentioned in RFC5092 which is what we are
> now trying to follow for our IMAP URL syntax:
>
> http://curl.haxx.se/rfc/rfc5092.txt

I did not know there was an RFC on a URL syntax for IMAP, that would
be very useful!
Since I am just learning how to use cURL for this purpose (i.e.
send/receive email) I am more than happy to learn whatever the correct
usage syntax is. Part of my frustration is that the documentation I
found reported results I could not reproduce. If one command format
reports "this will list messages in a mailbox" and then I only get a
list of flags for each message or I get a list of subfolders within a
mailbox, but not the messages themselves, then I'm left scratching my
head.

>
> Kind Regards
>
> Steve

Thank you, Steve!
-------------------------------------------------------------------
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 2014-04-25