aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2011-10-05 22:22:29 +0100
committerDaniel Stenberg <daniel@haxx.se>2012-02-14 22:50:49 +0100
commit0cf0ab6f3008aaad0bb5e3291539e80123028864 (patch)
tree4d4e57b2e1aa0305eb4697eae27115fc341f81a1 /lib/url.c
parentee7e4fc1d1d45713e9e67a955e78f0d9ed1a6059 (diff)
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.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 277078ebf..c4e84550f 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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 *);