Lines Matching defs:curl
12 * are also available at https://curl.se/docs/copyright.html.
21 * SPDX-License-Identifier: curl
32 #include <curl/curl.h>
97 CURL *curl;
102 curl = curl_easy_init();
103 if(curl) {
106 curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com:587");
109 curl_easy_setopt(curl, CURLOPT_USERNAME, "kurt");
110 curl_easy_setopt(curl, CURLOPT_PASSWORD, "xipj3plmq");
113 curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "ursel");
116 curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=PLAIN");
125 curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM_ADDR);
130 curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
135 curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
136 curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
137 curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
140 res = curl_easy_perform(curl);
150 /* curl will not send the QUIT command until you call cleanup, so you
158 curl_easy_cleanup(curl);