examples: Rename before adding additional email examples
This commit is contained in:
Родитель
18a6467c8c
Коммит
e9625c5bc6
|
@ -4,8 +4,8 @@ check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \
|
||||||
https multi-app multi-debugcallback multi-double multi-post multi-single \
|
https multi-app multi-debugcallback multi-double multi-post multi-single \
|
||||||
persistant post-callback postit2 sepheaders simple simplepost simplessl \
|
persistant post-callback postit2 sepheaders simple simplepost simplessl \
|
||||||
sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \
|
sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \
|
||||||
smtp-multi simplesmtp smtp-tls smtp-vrfy smtp-expn rtsp externalsocket \
|
smtp-multi smtp-send smtp-tls smtp-vrfy smtp-expn rtsp externalsocket \
|
||||||
resolve progressfunc pop3s pop3slist imap url2file sftpget ftpsget \
|
resolve progressfunc pop3s pop3slist imap-fetch url2file sftpget ftpsget \
|
||||||
postinmemory
|
postinmemory
|
||||||
|
|
||||||
# These examples require external dependencies that may not be commonly
|
# These examples require external dependencies that may not be commonly
|
||||||
|
|
|
@ -23,6 +23,11 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
/* This is a simple example showing how to send mail using libcurl's SMTP
|
||||||
|
* capabilities. For an exmaple of using the multi interface please see
|
||||||
|
* smtp-multi.c.
|
||||||
|
*/
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
|
@ -66,6 +71,7 @@ int main(void)
|
||||||
|
|
||||||
/* send the message (including headers) */
|
/* send the message (including headers) */
|
||||||
res = curl_easy_perform(curl);
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
/* Check for errors */
|
/* Check for errors */
|
||||||
if(res != CURLE_OK)
|
if(res != CURLE_OK)
|
||||||
fprintf(stderr, "curl_easy_perform() failed: %s\n",
|
fprintf(stderr, "curl_easy_perform() failed: %s\n",
|
||||||
|
@ -84,5 +90,6 @@ int main(void)
|
||||||
*/
|
*/
|
||||||
curl_easy_cleanup(curl);
|
curl_easy_cleanup(curl);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
|
@ -24,7 +24,7 @@
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
/* This is a simple example showing how to send mail using libcurl's SMTP
|
/* This is a simple example showing how to send mail using libcurl's SMTP
|
||||||
* capabilities. It builds on the simplesmtp.c example, adding some
|
* capabilities. It builds on the smtp-send.c example, adding some
|
||||||
* authentication and transport security.
|
* authentication and transport security.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -71,7 +71,6 @@ static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
|
@ -150,5 +149,6 @@ int main(void)
|
||||||
curl_slist_free_all(recipients);
|
curl_slist_free_all(recipients);
|
||||||
curl_easy_cleanup(curl);
|
curl_easy_cleanup(curl);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче