Subject: DRIVER for POP3

From: [email-masked]
Date: Fri, 8 Jun 2001 15:44:45 -0700

Hi,

When will the MAILSTREAM DRIVER field dtb gets initialinzed in case of POP3
?
I'm having problem marking messages for deletion as the dtb field is NIL.
mail_expunge doesn't mark the messages for deletion in the cache.

I'm doing the following steps to delete the messages.

void* th_main(void* arg)
{
    MAILSTREAM*     stream;
    MAILSTREAM      mbx;
    int j;

    memset((void *) &mbx, 0, sizeof(MAILSTREAM));

    mbx.mailbox = strdup(imap_string);  // where imap_string =
{bilbo.centigram.com:110}INBOX
    mbx.debug   = 1;
    mbx.inbox   = 1;

    stream = pop3_open(&mbx);

    if(!stream)
    {
        printf("imap session open failed for \n\r") ;
        return(0);
    }

    printf("new=%d, exist=%d\n\r", stream->recent, stream->nmsgs);

   char pop3_status[10], sequence[2];
   strcpy(pop3_status, "\\Deleted");

   for(j=1; j<=(stream->nmsgs); j++)
   {
         sprintf(sequence, "%d", j);
         mail_flag(stream, sequence, pop3_status, FT_NOT);
   }

   mail_expunge(stream);

    printf("closing imap session ...\n\r") ;

    pop3_close(stream, 0);
}

Thanks,
Manjula

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Fri, 8 Jun 2001 15:55:22 -0700 (PDT)

Your method of opening a POP3 session with c-client is...well...rather
"unique".  I'm not going to tell you how to fix your code to shortcut
mail_open() and call pop3_open() directly:

because you are not allowed to call pop3_open() directly.  You MUST use
mail_open().

In fact, you are not allowed to call any pop3_???() function, or any other
driver function.  The fact that a driver function is not declared static is
not license to reference it outside of c-client.