33 --libcurl for IMAP FETCH message
36 'imap://%HOSTIP:%IMAPPORT/1420/;UID=1' -u user:secret --libcurl log/test1420.c
41 # Verify data after the test has been "shot"
45 A002 LOGIN user secret
\r
50 <file name="log/test1420.c" mode="text">
51 /********* Sample code generated by the curl command line tool **********
52 * All curl_easy_setopt() options are documented at:
53 * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
54 ************************************************************************/
55 #include <curl/curl.h>
57 int main(int argc, char *argv[])
62 hnd = curl_easy_init();
63 curl_easy_setopt(hnd, CURLOPT_URL, "imap://%HOSTIP:%IMAPPORT/1420/;UID=1");
64 curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
65 curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret");
66 curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
67 curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
68 curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
69 curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
71 /* Here is a list of options the curl code used that cannot get generated
72 as source easily. You may select to either not use them or implement
75 CURLOPT_WRITEDATA set to a objectpointer
76 CURLOPT_WRITEFUNCTION set to a functionpointer
77 CURLOPT_READDATA set to a objectpointer
78 CURLOPT_READFUNCTION set to a functionpointer
79 CURLOPT_SEEKDATA set to a objectpointer
80 CURLOPT_SEEKFUNCTION set to a functionpointer
81 CURLOPT_ERRORBUFFER set to a objectpointer
82 CURLOPT_STDERR set to a objectpointer
83 CURLOPT_DEBUGFUNCTION set to a functionpointer
84 CURLOPT_DEBUGDATA set to a objectpointer
85 CURLOPT_HEADERFUNCTION set to a functionpointer
86 CURLOPT_HEADERDATA set to a objectpointer
90 ret = curl_easy_perform(hnd);
92 curl_easy_cleanup(hnd);
97 /**** End of sample code ****/
100 # curl's default user-agent varies with version, libraries etc.
101 s/(USERAGENT, \")[^\"]+/${1}stripped/
102 # CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
104 $_ = '' if /CURLOPT_SSL_VERIFYPEER/
105 $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/