Sorry to continue ask these questions to the list but I'm still having problems getting started with using c-client. I fixed the callback issue, and also found the documentation I was looking for. Now, I still can't make a successful mail_open call to an imap server. I'm attaching the code I have so far and will paste the error message here. Also, if anyone has a simple example of opening a mailbox and just accessing data from it that would be great.

Errror:
Can't open mailbox {pc1267.rtctel.com}inbox: invalid remote specification


#include <stdio.h>
#include <stdlib.h>
#include <c-client/mail.h>

void mm_searched (MAILSTREAM *stream,unsigned long number) {
        printf("Called searched: \n");
}

void mm_exists (MAILSTREAM *stream,unsigned long number) {
        printf("Called exists: \n");    
}

void mm_expunged (MAILSTREAM *stream,unsigned long number) {
        printf("Called expunged: \n");
}


void mm_flags (MAILSTREAM *stream,unsigned long number) {
        printf("Called flags: \n");
}


void mm_notify (MAILSTREAM *stream,char *string,long errflg) {
        printf("Called notify: \n");
}


void mm_list (MAILSTREAM *stream,int delimiter,char *name,long attributes) {
        printf("Called list: \n");
}


void mm_lsub (MAILSTREAM *stream,int delimiter,char *name,long attributes) {
        printf("Called lsub: \n");
}


void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status) {
        printf("Called status: \n");
}


void mm_log (char *string,long errflg) {
        printf("%s:\n", string);
}


void mm_dlog (char *string) {
        printf("Called dlog: \n");
}


void mm_login (NETMBX *mb,char *user,char *pwd,long trial) {
        printf("Called login: \n");
}

void mm_critical (MAILSTREAM *stream) {
        printf("Called critical: \n");
}


void mm_nocritical (MAILSTREAM *stream) {
        printf("Called nocritical: \n");
}


long mm_diskerror (MAILSTREAM *stream,long errcode,long serious) {
        printf("Called diskerror: \n");
}


void mm_fatal (char *string) {
        printf("Called fatal: \n");
}


int main(int argc, char *argv[]) {

        MAILSTREAM *stream = NIL;
        DRIVER *driver = NIL;

        if(argc < 2) {
                printf("usage: %s mailbox\n", argv[0]);
                return 0;
        }

        if((stream = mail_open(NIL, "{pc1267.rtctel.com/user=cmcbee}inbox", 0)) 
== NIL) {
                return 0;
        }

        mail_close(stream);

        return 0;
}

Reply via email to