]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
examples/smtp-mime: use CURLOPT_MAIL_RCPT_ALLOWFAILS
authorDaniel Stenberg <daniel@haxx.se>
Sat, 17 Jun 2023 22:40:13 +0000 (00:40 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 18 Jun 2023 09:08:22 +0000 (11:08 +0200)
For show

Closes #11335

docs/examples/smtp-mime.c

index 872dbff6c337bdac975ddd2f754cf25753e5d0d7..8e19e7e2ee84d91af5747606512b57b621f0c437 100644 (file)
@@ -102,6 +102,9 @@ int main(void)
     recipients = curl_slist_append(recipients, CC);
     curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
 
+    /* allow one of the recipients to fail and still consider it okay */
+    curl_easy_setopt(curl, CURLOPT_MAIL_RCPT_ALLOWFAILS, 1L);
+
     /* Build and set the message header list. */
     for(cpp = headers_text; *cpp; cpp++)
       headers = curl_slist_append(headers, *cpp);