1CURLOPT_MAIL_RCPT(3)       curl_easy_setopt options       CURLOPT_MAIL_RCPT(3)
2
3
4

NAME

6       CURLOPT_MAIL_RCPT - list of SMTP mail recipients
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_RCPT,
12                                 struct curl_slist *rcpts);
13

DESCRIPTION

15       Pass  a pointer to a linked list of recipients to pass to the server in
16       your SMTP mail request. The linked list should be a fully valid list of
17       struct  curl_slist structs properly filled in. Use curl_slist_append(3)
18       to create the list and curl_slist_free_all(3) to  clean  up  an  entire
19       list.
20
21       When  performing  a  mail  transfer, each recipient should be specified
22       within a pair of angled brackets (<>), however, should you not  use  an
23       angled  bracket as the first character libcurl will assume you provided
24       a single email address and enclose that  address  within  brackets  for
25       you.
26
27       When  performing an address verification (VRFY command), each recipient
28       should be specified as the user name or user name and  domain  (as  per
29       Section 3.5 of RFC5321).
30
31       When  performing  a  mailing list expand (EXPN command), each recipient
32       should be specified using the mailing list name, such as  "Friends"  or
33       "London-Office".
34

DEFAULT

36       NULL
37

PROTOCOLS

39       SMTP
40

EXAMPLE

42       CURL *curl = curl_easy_init();
43       if(curl) {
44         struct curl_slist *list;
45         list = curl_slist_append(NULL, "root@localhost");
46         list = curl_slist_append(list, "person@example.com");
47         curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
48         curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, list);
49         ret = curl_easy_perform(curl);
50         curl_slist_free_all(list);
51         curl_easy_cleanup(curl);
52       }
53

AVAILABILITY

55       Added in 7.20.0. The VRFY and EXPN logic was added in 7.34.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_AUTH(3),
63
64
65
66libcurl 7.69.1                   July 16, 2019            CURLOPT_MAIL_RCPT(3)
Impressum