1CURLOPT_MAIL_RCPT_ALLLOWFAILcSu(r3l)_easy_setopt optCiUoRnLsOPT_MAIL_RCPT_ALLLOWFAILS(3)
2
3
4

NAME

6       CURLOPT_MAIL_RCPT_ALLLOWFAILS  - allow RCPT TO command to fail for some
7       recipients
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_RCPT_ALLLOWFAILS,
13                                 long allow);
14

DESCRIPTION

16       If allow is set to 1L, allow RCPT TO command to fail for  some  recipi‐
17       ents.
18
19       When  sending  data  to multiple recipients, by default curl will abort
20       SMTP conversation if at least one of the recipients causes RCPT TO com‐
21       mand to return an error.
22
23       The  default behavior can be changed by setting ignore to 1L which will
24       make curl ignore errors and proceed with the  remaining  valid  recipi‐
25       ents.
26
27       If  all recipients trigger RCPT TO failures and this flag is specified,
28       curl will still abort the SMTP conversation and return  the  error  re‐
29       ceived from to the last RCPT TO command.
30

DEFAULT

32       0
33

PROTOCOLS

35       SMTP
36

EXAMPLE

38       CURL *curl = curl_easy_init();
39       if(curl) {
40         struct curl_slist *list;
41
42         /* Adding one valid and one invalid email address */
43         list = curl_slist_append(NULL, "person@example.com");
44         list = curl_slist_append(list, "invalidemailaddress");
45
46         curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
47         curl_easy_setopt(curl, CURLOPT_MAIL_RCPT_ALLLOWFAILS, 1L);
48
49         ret = curl_easy_perform(curl);
50         curl_slist_free_all(list);
51         curl_easy_cleanup(curl);
52       }
53

AVAILABILITY

55       Added in 7.69.0.
56

RETURN VALUE

58       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
59       if not.
60

SEE ALSO

62       CURLOPT_MAIL_FROM(3), CURLOPT_MAIL_RCPT(3),
63
64
65
66libcurl 7.82.0                   July 26, 2021CURLOPT_MAIL_RCPT_ALLLOWFAILS(3)
Impressum