using imclient

Patrick Radtke phr2101 at
Wed Mar 16 16:04:48 EST 2005

I'll add a little code sample

// server returns NO on an error
imclient_addcallback(imclient, "NO",

  nc =1;
   imclient_send(imclient,end_command,(void*) &nc,"create 
  while(nc > 0) {
cout << "create data is " << error_string << endl;

So bigtestuser3 already exists. So I would expect the imap server to 
return 'NO Mailbox already exists'.
So I add a callback on the keyword 'NO', but it never gets called. Are 
there other settings I need to use on the callback?

The 'nc' and 'end_command' stuff is how things were done in 'man 



On Mar 16, 2005, at 12:41 PM, Patrick Radtke wrote:

> Hi,
> I am trying to write a program using imclient.
> I am not sure how to detect errors when I use send.
> For example when I send 'create user/phr2101'
> I am unsure how to get the error message from the action (since the 
> account already exists).
> Does anyone know? or have sample code using imclient that I could look 
> at?
> thanks,
> Patrick
> ---
> Cyrus Home Page:
> Cyrus Wiki/FAQ:
> List Archives/Info:

Cyrus Home Page:
Cyrus Wiki/FAQ:
List Archives/Info:

More information about the Info-cyrus mailing list