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

NAME

6       CURLOPT_MAIL_AUTH - SMTP authentication address
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_AUTH, char *auth);
12

DESCRIPTION

14       Pass  a  pointer to a zero terminated string as parameter. This will be
15       used to specify the authentication address (identity)  of  a  submitted
16       message that is being relayed to another server.
17
18       This  optional  parameter allows co-operating agents in a trusted envi‐
19       ronment to communicate the authentication of  individual  messages  and
20       should  only  be used by the application program, using libcurl, if the
21       application is itself a mail server acting in such an  environment.  If
22       the  application is operating as such and the AUTH address is not known
23       or is invalid, then an empty string should be used for this parameter.
24
25       Unlike  CURLOPT_MAIL_FROM(3)  and  CURLOPT_MAIL_RCPT(3),  the   address
26       should not be specified within a pair of angled brackets (<>). However,
27       if an empty string is used then a pair of  brackets  will  be  sent  by
28       libcurl as required by RFC2554.
29
30       The  application  does not have to keep the string around after setting
31       this option.
32

DEFAULT

34       NULL
35

PROTOCOLS

37       SMTP
38

EXAMPLE

40       CURL *curl = curl_easy_init();
41       if(curl) {
42         curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
43         curl_easy_setopt(curl, CURLOPT_MAIL_AUTH, "<secret@cave>");
44         ret = curl_easy_perform(curl);
45         curl_easy_cleanup(curl);
46       }
47

AVAILABILITY

49       Added in 7.25.0
50

RETURN VALUE

52       Returns CURLE_OK if the option is  supported,  CURLE_UNKNOWN_OPTION  if
53       not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
54

SEE ALSO

56       CURLOPT_MAIL_FROM(3), CURLOPT_MAIL_RCPT(3),
57
58
59
60libcurl 7.69.1                   May 31, 2017             CURLOPT_MAIL_AUTH(3)
Impressum