3 # N.B. --libcurl output not sufficient to deal with uploaded files.
25 <file name="log/test1406.eml">
32 smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 1406@foo --mail-rcpt 1406@foobar.example --mail-from 1406@from -T log/test1406.eml --libcurl log/test1406.c
37 # Verify data after the test has been "shot"
41 MAIL FROM:<1406@from> SIZE=38
\r
43 RCPT TO:<1406@foobar.example>
\r
54 <file name="log/test1406.c" mode="text">
55 /********* Sample code generated by the curl command line tool **********
56 * All curl_easy_setopt() options are documented at:
57 * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
58 ************************************************************************/
59 #include <curl/curl.h>
61 int main(int argc, char *argv[])
65 struct curl_slist *slist1;
68 slist1 = curl_slist_append(slist1, "1406@foo");
69 slist1 = curl_slist_append(slist1, "1406@foobar.example");
71 hnd = curl_easy_init();
72 curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, (curl_off_t)38);
73 curl_easy_setopt(hnd, CURLOPT_URL, "smtp://%HOSTIP:%SMTPPORT/user");
74 curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
75 curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
76 curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
77 curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
78 curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
79 curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
80 curl_easy_setopt(hnd, CURLOPT_MAIL_FROM, "1406@from");
81 curl_easy_setopt(hnd, CURLOPT_MAIL_RCPT, slist1);
83 /* Here is a list of options the curl code used that cannot get generated
84 as source easily. You may select to either not use them or implement
87 CURLOPT_WRITEDATA set to a objectpointer
88 CURLOPT_WRITEFUNCTION set to a functionpointer
89 CURLOPT_READDATA set to a objectpointer
90 CURLOPT_READFUNCTION set to a functionpointer
91 CURLOPT_SEEKDATA set to a objectpointer
92 CURLOPT_SEEKFUNCTION set to a functionpointer
93 CURLOPT_ERRORBUFFER set to a objectpointer
94 CURLOPT_STDERR set to a objectpointer
95 CURLOPT_DEBUGFUNCTION set to a functionpointer
96 CURLOPT_DEBUGDATA set to a objectpointer
97 CURLOPT_HEADERFUNCTION set to a functionpointer
98 CURLOPT_HEADERDATA set to a objectpointer
102 ret = curl_easy_perform(hnd);
104 curl_easy_cleanup(hnd);
106 curl_slist_free_all(slist1);
111 /**** End of sample code ****/
114 # curl's default user-agent varies with version, libraries etc.
115 s/(USERAGENT, \")[^\"]+/${1}stripped/
116 # CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
118 $_ = '' if /CURLOPT_SSL_VERIFYPEER/
119 $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/