summaryrefslogtreecommitdiff
path: root/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3
diff options
context:
space:
mode:
Diffstat (limited to 'docs/libcurl/opts/CURLOPT_MAIL_RCPT.3')
-rw-r--r--docs/libcurl/opts/CURLOPT_MAIL_RCPT.337
1 files changed, 21 insertions, 16 deletions
diff --git a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3
index c14ef6c39..595c22166 100644
--- a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3
+++ b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -22,7 +22,7 @@
.\" *
.\" **************************************************************************
.\"
-.TH CURLOPT_MAIL_RCPT 3 "September 20, 2022" "libcurl 7.86.0" "curl_easy_setopt options"
+.TH CURLOPT_MAIL_RCPT 3 "December 04, 2023" "ibcurl 8.5.0" libcurl
.SH NAME
CURLOPT_MAIL_RCPT \- list of SMTP mail recipients
@@ -41,12 +41,12 @@ to clean up an entire list.
When performing a mail transfer, each recipient should be specified within a
pair of angled brackets (<>), however, should you not use an angled bracket as
-the first character libcurl will assume you provided a single email address
-and enclose that address within brackets for you.
+the first character libcurl assumes you provided a single email address and
+encloses that address within brackets for you.
When performing an address verification (\fBVRFY\fP command), each recipient
should be specified as the user name or user name and domain (as per Section
-3.5 of RFC5321).
+3.5 of RFC 5321).
When performing a mailing list expand (\fBEXPN\fP command), each recipient
should be specified using the mailing list name, such as "Friends" or
@@ -57,16 +57,20 @@ NULL
SMTP
.SH EXAMPLE
.nf
-CURL *curl = curl_easy_init();
-if(curl) {
- struct curl_slist *list;
- list = curl_slist_append(NULL, "root@localhost");
- list = curl_slist_append(list, "person@example.com");
- curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
- curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, list);
- ret = curl_easy_perform(curl);
- curl_slist_free_all(list);
- curl_easy_cleanup(curl);
+int main(void)
+{
+ CURL *curl = curl_easy_init();
+ if(curl) {
+ CURLcode res;
+ struct curl_slist *list;
+ list = curl_slist_append(NULL, "root@localhost");
+ list = curl_slist_append(list, "person@example.com");
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, list);
+ res = curl_easy_perform(curl);
+ curl_slist_free_all(list);
+ curl_easy_cleanup(curl);
+ }
}
.fi
.SH AVAILABILITY
@@ -74,4 +78,5 @@ Added in 7.20.0. The \fBVRFY\fP and \fBEXPN\fP logic was added in 7.34.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
-.BR CURLOPT_MAIL_FROM "(3), " CURLOPT_MAIL_AUTH "(3), "
+.BR CURLOPT_MAIL_AUTH (3),
+.BR CURLOPT_MAIL_FROM (3)