diff options
author | Guenter Knauf <lists@gknw.net> | 2012-07-04 17:03:52 +0200 |
---|---|---|
committer | Guenter Knauf <lists@gknw.net> | 2012-07-04 17:03:52 +0200 |
commit | a3dbbcfd2ac7ab8f597e26e76935726279d3fa0c (patch) | |
tree | 10019b38cc070abd7e9b781761b0e9f27f6ffeea /docs/examples/simplesmtp.c | |
parent | 6388ac7dc1f531f4f94616e8e0a46a0cecde8315 (diff) |
Added error checking for samples.
Diffstat (limited to 'docs/examples/simplesmtp.c')
-rw-r--r-- | docs/examples/simplesmtp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/examples/simplesmtp.c b/docs/examples/simplesmtp.c index 84429f5bf..df8516242 100644 --- a/docs/examples/simplesmtp.c +++ b/docs/examples/simplesmtp.c @@ -65,6 +65,10 @@ int main(void) /* send the message (including headers) */ res = curl_easy_perform(curl); + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); /* free the list of recipients */ curl_slist_free_all(recipients); |