summaryrefslogtreecommitdiffstats
path: root/sendlib.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1999-12-13 11:36:01 +0000
committerThomas Roessler <roessler@does-not-exist.org>1999-12-13 11:36:01 +0000
commite332ccf872948b1bf890d48f5b127f1399a004a3 (patch)
treeebc219decf0873557322105d49f73be6e938ee28 /sendlib.c
parentd06304a8e1e771a08ca2fdf33d5f768ba9712620 (diff)
Adding the envelope_from option.
Diffstat (limited to 'sendlib.c')
-rw-r--r--sendlib.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sendlib.c b/sendlib.c
index 9aa49c21..ecefe7f8 100644
--- a/sendlib.c
+++ b/sendlib.c
@@ -1629,7 +1629,8 @@ strsysexit(int e)
int
-mutt_invoke_sendmail (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc, /* recips */
+mutt_invoke_sendmail (ADDRESS *from, /* the sender */
+ ADDRESS *to, ADDRESS *cc, ADDRESS *bcc, /* recips */
const char *msg, /* file containing message */
int eightbit) /* message contains 8bit chars */
{
@@ -1660,8 +1661,15 @@ mutt_invoke_sendmail (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc, /* recips */
ps = NULL;
i++;
}
+
if (eightbit && option (OPTUSE8BITMIME))
args = add_option (args, &argslen, &argsmax, "-B8BITMIME");
+
+ if (option (OPTENVFROM) && from && !from->next)
+ {
+ args = add_option (args, &argslen, &argsmax, "-f");
+ args = add_args (args, &argslen, &argsmax, from);
+ }
if (DsnNotify)
{
args = add_option (args, &argslen, &argsmax, "-N");
@@ -1850,7 +1858,8 @@ static void _mutt_bounce_message (FILE *fp, HEADER *h, ADDRESS *to, const char *
mutt_copy_bytes (fp, f, h->content->length);
fclose (f);
- mutt_invoke_sendmail (to, NULL, NULL, tempfile, h->content->encoding == ENC8BIT);
+ mutt_invoke_sendmail (NULL, to, NULL, NULL, tempfile,
+ h->content->encoding == ENC8BIT);
}
if (msg)