diff options
author | Daniel Stenberg <daniel@haxx.se> | 2009-12-12 21:54:01 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2009-12-12 21:54:01 +0000 |
commit | ec3bb8f727405642a471b4b1b9eb0118fc003104 (patch) | |
tree | cf1eac52d5df82ba08514b43b5d058803d164b66 /src | |
parent | 463d2d395caaafc557590a09aa01db28527e560f (diff) |
introducing IMAP, POP3 and SMTP support (still lots of polish left to do)
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 47e25fb7e..f7c2eb43e 100644 --- a/src/main.c +++ b/src/main.c @@ -500,6 +500,8 @@ struct Configurable { char *proxy; int proxyver; /* set to CURLPROXY_HTTP* define */ char *noproxy; + char *mail_from; + char *mail_rcpt; bool proxytunnel; bool ftp_append; /* APPE on ftp */ bool mute; /* shutup */ @@ -822,6 +824,8 @@ static void help(void) " -L/--location Follow Location: hints (H)", " --location-trusted Follow Location: and send auth to other hosts (H)", " -M/--manual Display the full manual", + " --mail-from <from> Mail from this address", + " --mail-rcpt <to> Mail to this receiver(s)", " --max-filesize <bytes> Maximum file size to download (H/F)", " --max-redirs <num> Maximum number of redirects allowed (H)", " -m/--max-time <seconds> Maximum time allowed for the transfer", @@ -1740,6 +1744,8 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ #endif {"$8", "proxy1.0", TRUE}, {"$9", "tftp-blksize", TRUE}, + {"$A", "mail-from", TRUE}, + {"$B", "mail-rcpt", TRUE}, {"0", "http1.0", FALSE}, {"1", "tlsv1", FALSE}, {"2", "sslv2", FALSE}, @@ -2269,6 +2275,12 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ case '9': /* --tftp-blksize */ str2num(&config->tftp_blksize, nextarg); break; + case 'A': /* --mail-from */ + GetStr(&config->mail_from, nextarg); + break; + case 'B': /* --mail-rcpt */ + GetStr(&config->mail_rcpt, nextarg); + break; } break; case '#': /* --progress-bar */ @@ -5006,9 +5018,16 @@ operate(struct Configurable *config, int argc, argv_item_t argv[]) my_setopt(curl, CURLOPT_POSTREDIR, config->post301 | (config->post302 ? CURL_REDIR_POST_302 : FALSE)); + /* curl 7.20.0 */ if(config->tftp_blksize) my_setopt(curl, CURLOPT_TFTP_BLKSIZE, config->tftp_blksize); + if(config->mail_from) + my_setopt_str(curl, CURLOPT_MAIL_FROM, config->mail_from); + + if(config->mail_rcpt) + my_setopt_str(curl, CURLOPT_MAIL_RCPT, config->mail_rcpt); + retry_numretries = config->req_retry; retrystart = cutil_tvnow(); |