summaryrefslogtreecommitdiff
path: root/docs/examples/simplesmtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/simplesmtp.c')
-rw-r--r--docs/examples/simplesmtp.c4
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);