RE: problem with readmsg-simple
DINH Viet Hoa <[email protected]>
| Newsgroups | gmane.mail.libetpan.user |
|---|---|
| Message-ID | <etPan.40587a72.4d7aca5a.7e4f@homer> |
Nick Hoffman [UWO] wrote :
> Nevermind, I got it. The # that `frm-simple` displays is not the full
> message number. Why is that?
I think that was inherited from etpan :)
> For each of these example programs, the mail folder must be specified
> (--path=.. option). Is there a way to determine all of the folders on
> the server?
not, you have to write some program that will use the IMAP lower
API to determine the list of folders if you have some skills in C
language.
#include <libetpan/libetpan.h>
#define IMAP_PORT 143
clist * list;
mailimap * imap;
mailstream * s;
int fd;
imap = mailimap_new(0, NULL); /* two parameters must be 0 and NULL */
fd = mail_tcp_connect("my-imap.server.foo", IMAP_PORT);
s = mailstream_socket_open(fd);
mailimap_connect(imap, s);
mailimap_login(imap, "login", "password");
mailimap_list(imap, "", "*", &list);
/*
or
*/
mailimap_lsub(imap, "", "*", &list); /* for the subscribed folders */
for(cur = clist_begin(list) ; cur != NULL ; cur = cur->next) {
struct mailimap_mailbox_list * mb_list;
mb_list = clist_content(cur);
printf("%s\n", mb_list->mb_name);
}
mailimap_list_result_free(list);
mailimap_logout(imap);
mailimap_free(imap);
I didn't put the checks but you HAVE TO.
--
DINH V. Hoa,
etPan! - newsreader, mail user agent -- http://libetpan.sf.net/etpan
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQBAWHyF7w+pfAWHa3MRAijdAJ4zyTAP/amLVAIOXXuBeMwLM2gyBwCffId7 DTo8q4NpvkRqgcWd4DTGOKE= =I+va -----END PGP SIGNATURE-----