Re: How to get message by UID via POP3 protocol?

"DINH Viêt Hoà" <[email protected]> Tue, 1 May 2007 21:22:49 +0200
Newsgroups gmane.mail.libetpan.user
Message-ID <[email protected]>
On 5/1/07, [email protected] <[email protected]> wrote:
>
> Hello
>
>  I test readmsg-uid.c to try to fetch message by UID via POP3 protocol
>  but it always not work
>
>  I trace these follow code
>
>    /* get the folder structure */
>
>    folder = mailfolder_new(storage, path, NULL);
>    if (folder == NULL) {
>      printf("error initializing folder\n");
>      goto free_storage;
>    }
>
>    r = mailfolder_connect(folder);
>    if (r != MAIL_NO_ERROR) {
>      printf("error initializing folder\n");
>      goto free_folder;
>    }
>
>    while (optind < argc) {
>      mailmessage * msg;
>      char * data;
>      size_t size;
>      char * uid;
>
>      uid = argv[optind];
>
>      r =
> mailsession_get_message_by_uid(folder->fld_session, uid,
> &msg);
>      if (r != MAIL_NO_ERROR) {
>        printf("** get message %s not found **\n", uid);
>
>
>  find out mailsession_get_message_by_uid() is implemented
> only for cached drivers
>
>  The test result seem like POP3 is not an cached driver..
>
>  And I add argument "-c /root/" to add cached directory for testing
> readmsg-uid
>  It still not work
>
>  How could I get message by UID via POP3 protocol, thank you :)

You have to add "-f directory" parameter to use the cached driver.
I am soon committing something to get it work in the non-cached version.

-- 
DINH Viêt Hoà

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/