RE: problem with readmsg-simple
"Nick Hoffman [UWO]" <[email protected]>
| Newsgroups | gmane.mail.libetpan.user |
|---|---|
| Message-ID | <000801c40db1$cf5bf820$8119fea9@athlon> |
A suggestion, if I may: many of the functions in libetpan take char* parameters, but don't modify those vars. Whichever vars aren't modified within the functions should be changed to `const char*` in the function prototype. This will also remove the annoyance of having to strcpy() every C++ std:string to a char* for use in these functions. -Nick > -----Original Message----- > From: libetpan-users-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > [mailto:libetpan-users-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf > Of DINH Viet Hoa > Sent: Wednesday, March 17, 2004 11:19 AM > To: [email protected] > Subject: RE: [Libetpan-users] problem with readmsg-simple > > > 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 > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.620 / Virus Database: 399 - Release Date: 3/11/2004 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click