smtp_mail: Added support to MAIL FROM for the optional AUTH parameter
Added a new CURLOPT_MAIL_AUTH option that allows the calling program to set the optional AUTH parameter in the MAIL FROM command. When this option is specified and an authentication mechanism is used to communicate with the mail server then the AUTH parameter will be included in the MAIL FROM command. This is particularly useful when the calling program is acting as a relay in a trusted environment and performing server to server communication, as it allows the relaying server to specify the address of the mailbox that was used to authenticate and send the original email.
This commit is contained in:
committed by
Daniel Stenberg
parent
ee7e4fc1d1
commit
0cf0ab6f30
@@ -2402,6 +2402,11 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
||||
va_arg(param, char *));
|
||||
break;
|
||||
|
||||
case CURLOPT_MAIL_AUTH:
|
||||
result = setstropt(&data->set.str[STRING_MAIL_AUTH],
|
||||
va_arg(param, char *));
|
||||
break;
|
||||
|
||||
case CURLOPT_MAIL_RCPT:
|
||||
/* get a list of mail recipients */
|
||||
data->set.mail_rcpt = va_arg(param, struct curl_slist *);
|
||||
|
||||
Reference in New Issue
Block a user