mirror of
https://github.com/curl/curl.git
synced 2026-07-24 00:27:16 +03:00
smtp: allow suffix behind a mail address for RFC 3461
Verified in test 3215 Closes #16643
This commit is contained in:
parent
3ccffad28d
commit
450c00f983
6 changed files with 98 additions and 19 deletions
|
|
@ -32,6 +32,9 @@ to specify the sender's email address when sending SMTP mail with libcurl.
|
|||
An originator email address should be specified with angled brackets (\<\>)
|
||||
around it, which if not specified are added automatically.
|
||||
|
||||
In order to specify DSN parameters (as per RFC 3461), the address has to be
|
||||
written in angled brackets, followed by the parameters.
|
||||
|
||||
If this parameter is not specified then an empty address is sent to the SMTP
|
||||
server which might cause the email to be rejected.
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@ pair of angled brackets (\<\>), however, should you not use an angled bracket
|
|||
as the first character libcurl assumes you provided a single email address and
|
||||
encloses that address within brackets for you.
|
||||
|
||||
In order to specify DSN parameters (as per RFC 3461), the address has to be
|
||||
written in angled brackets, followed by the parameters.
|
||||
|
||||
When performing an address verification (**VRFY** command), each recipient
|
||||
should be specified as the username or username plus domain (as per Section
|
||||
3.5 of RFC 5321).
|
||||
|
|
@ -68,6 +71,7 @@ int main(void)
|
|||
struct curl_slist *list;
|
||||
list = curl_slist_append(NULL, "root@localhost");
|
||||
list = curl_slist_append(list, "person@example.com");
|
||||
list = curl_slist_append(list, "<other@example.com> NOTIFY=SUCCESS");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, list);
|
||||
res = curl_easy_perform(curl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue