smtp: Allow RCPT TO command to fail for some recipients

Introduces CURLOPT_MAIL_RCPT_ALLLOWFAILS.

Verified with the new tests 3002-3007

Closes #4816
This commit is contained in:
Pavel Volgarev 2020-01-14 17:22:38 -05:00 committed by Daniel Stenberg
parent 23a17e039d
commit 4a4609bf3c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
22 changed files with 483 additions and 26 deletions

View file

@ -273,6 +273,7 @@ static const struct LongShort aliases[]= {
{"f", "fail", ARG_BOOL},
{"fa", "fail-early", ARG_BOOL},
{"fb", "styled-output", ARG_BOOL},
{"fc", "mail-rcpt-allowfails", ARG_BOOL},
{"F", "form", ARG_STRING},
{"Fs", "form-string", ARG_STRING},
{"g", "globoff", ARG_BOOL},
@ -1722,6 +1723,9 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
case 'b': /* --styled-output */
global->styled_output = toggle;
break;
case 'c': /* --mail-rcpt-allowfails */
config->mail_rcpt_allowfails = toggle;
break;
default: /* --fail (hard on errors) */
config->failonerror = toggle;
}