3 # N.B. --libcurl output not sufficient to deal with uploaded files.
31 <file name="log/test1406.eml">
38 smtp://%HOSTIP:%SMTPPORT/1406 --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-from sender@example.com -T log/test1406.eml --libcurl log/test1406.c
43 # Verify data after the test has been "shot"
47 MAIL FROM:<sender@example.com> SIZE=38
48 RCPT TO:<recipient.one@example.com>
49 RCPT TO:<recipient.two@example.com>
60 <file name="log/test1406.c" mode="text">
61 /********* Sample code generated by the curl command line tool **********
62 * All curl_easy_setopt() options are documented at:
63 * https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
64 ************************************************************************/
65 #include <curl/curl.h>
67 int main(int argc, char *argv[])
71 struct curl_slist *slist1;
74 slist1 = curl_slist_append(slist1, "recipient.one@example.com");
75 slist1 = curl_slist_append(slist1, "recipient.two@example.com");
77 hnd = curl_easy_init();
78 curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
79 curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, (curl_off_t)38);
80 curl_easy_setopt(hnd, CURLOPT_URL, "smtp://%HOSTIP:%SMTPPORT/1406");
81 curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
82 curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
83 curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
84 curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
85 curl_easy_setopt(hnd, CURLOPT_MAIL_FROM, "sender@example.com");
86 curl_easy_setopt(hnd, CURLOPT_MAIL_RCPT, slist1);
88 /* Here is a list of options the curl code used that cannot get generated
89 as source easily. You may select to either not use them or implement
92 CURLOPT_WRITEDATA set to a objectpointer
93 CURLOPT_INTERLEAVEDATA set to a objectpointer
94 CURLOPT_WRITEFUNCTION set to a functionpointer
95 CURLOPT_READDATA set to a objectpointer
96 CURLOPT_READFUNCTION set to a functionpointer
97 CURLOPT_SEEKDATA set to a objectpointer
98 CURLOPT_SEEKFUNCTION set to a functionpointer
99 CURLOPT_ERRORBUFFER set to a objectpointer
100 CURLOPT_STDERR set to a objectpointer
101 CURLOPT_DEBUGFUNCTION set to a functionpointer
102 CURLOPT_DEBUGDATA set to a objectpointer
103 CURLOPT_HEADERFUNCTION set to a functionpointer
104 CURLOPT_HEADERDATA set to a objectpointer
108 ret = curl_easy_perform(hnd);
110 curl_easy_cleanup(hnd);
112 curl_slist_free_all(slist1);
117 /**** End of sample code ****/
120 # These options vary with configurations - just ignore them
121 $_ = '' if /CURLOPT_USERAGENT/
122 $_ = '' if /CURLOPT_MAXREDIRS/
123 $_ = '' if /CURLOPT_SSL_VERIFYPEER/
124 $_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
125 $_ = '' if /CURLOPT_HTTP_VERSION/