diff options
author | Daniel Stenberg <daniel@haxx.se> | 2009-12-31 21:52:01 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2009-12-31 21:52:01 +0000 |
commit | 3f3f6be825da333055a1113c4998691b086f4601 (patch) | |
tree | 01585ab30e8a0aa6e5e60168b393f8ba71d1f767 /src | |
parent | 01682cca550802401aefb0538416a17f8271fc88 (diff) |
turned CURLOPT_MAIL_RCPT into a curl_slist list instead to support multiple
receivers, and made the command line tool thus support the option specified
many times
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c index 39120913f..09d4c827b 100644 --- a/src/main.c +++ b/src/main.c @@ -501,7 +501,7 @@ struct Configurable { int proxyver; /* set to CURLPROXY_HTTP* define */ char *noproxy; char *mail_from; - char *mail_rcpt; + struct curl_slist *mail_rcpt; bool proxytunnel; bool ftp_append; /* APPE on ftp */ bool mute; /* shutup */ @@ -2279,7 +2279,10 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ GetStr(&config->mail_from, nextarg); break; case 'B': /* --mail-rcpt */ - GetStr(&config->mail_rcpt, nextarg); + /* append receiver to a list */ + err = add2list(&config->mail_rcpt, nextarg); + if(err) + return err; break; } break; @@ -3837,6 +3840,7 @@ static void free_config_fields(struct Configurable *config) curl_slist_free_all(config->postquote); curl_slist_free_all(config->headers); curl_slist_free_all(config->telnet_options); + curl_slist_free_all(config->mail_rcpt); if(config->easy) curl_easy_cleanup(config->easy); |