Created
September 25, 2016 23:09
-
-
Save jsm222/7b26a89e24bc7f554443dbe3f5261f48 to your computer and use it in GitHub Desktop.
Prompt for password to late...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <cyrus/imclient.h> | |
#include "assert.h" | |
static struct imclient *imclient; | |
void fatal(const char *s, int code) | |
{ | |
fprintf(stderr, "Fatal error: %s\n", s); | |
exit(code); | |
} | |
char server[] = "localhost" ; | |
char port[] = "imap"; | |
char mech[] ="CRAM-MD5"; | |
char service[] = "imap"; | |
int main() { | |
if(imclient_connect(&imclient, server, port,NULL)) { | |
fprintf(stderr, | |
"error: Couldn't connect to %s %s\n", | |
server, port); | |
} | |
int ret = imclient_authenticate(imclient, mech,service,NULL, 0,10000); | |
printf("%d",ret); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment