X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sendlib.c;h=1f5b5b52524f5ba13d9effadf97ed164570c3b7e;hp=1e8ffe7f6f55a57af92bae0592bf473d9bd9a335;hb=d6988dab6bd378ccdf0f17aaa16de8aee1ceaf43;hpb=08b24cfbdc0c35af65891f5b2478dc0ee33feb7e diff --git a/sendlib.c b/sendlib.c index 1e8ffe7..1f5b5b5 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1012,7 +1012,7 @@ void mutt_message_to_7bit (BODY * a, FILE * fp) mutt_copy_hdr (fpin, fpout, a->offset, a->offset + a->length, CH_MIME | CH_NONEWLINE | CH_XMIT, NULL); - fputs ("Mime-Version: 1.0\n", fpout); + fputs ("MIME-Version: 1.0\n", fpout); mutt_write_mime_header (a->parts, fpout); fputc ('\n', fpout); mutt_write_mime_body (a->parts, fpout); @@ -1576,7 +1576,7 @@ int mutt_write_rfc822_header (FILE * fp, ENVELOPE * env, BODY * attach, } /* Add the MIME headers */ - fputs ("Mime-Version: 1.0\n", fp); + fputs ("MIME-Version: 1.0\n", fp); mutt_write_mime_header (attach, fp); } @@ -2025,9 +2025,16 @@ static int mutt_invoke_sendmail (ADDRESS * from, /* the sender */ 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 (option (OPTENVFROM)) { + ADDRESS *f = NULL; + if (EnvFrom) + f = EnvFrom; + else if (from && !from->next) + f = from; + if (f) { + args = add_option (args, &argslen, &argsmax, "-f"); + args = add_args (args, &argslen, &argsmax, f); + } } if (DsnNotify) { args = add_option (args, &argslen, &argsmax, "-N"); @@ -2493,7 +2500,7 @@ int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid, rewind (tempfp); while (fgets (sasha, sizeof (sasha), tempfp) != NULL) lines++; - fprintf (msg->fp, "Content-Length: %ld\n", (long) ftell (tempfp)); + fprintf (msg->fp, "Content-Length: " OFF_T_FMT "\n", (long) ftell (tempfp)); fprintf (msg->fp, "Lines: %d\n\n", lines); /* copy the body and clean up */