{ "edit_headers", DT_BOOL, R_NONE, OPTEDITHDRS, 0 },
{ "edit_hdrs", DT_SYN, R_NONE, UL "edit_headers", 0 },
{ "editor", DT_PATH, R_NONE, UL &Editor, 0 },
+ { "encode_from", DT_BOOL, R_NONE, OPTENCODEFROM, 0 },
{ "escape", DT_STR, R_NONE, UL &EscChar, UL "~" },
{ "fast_reply", DT_BOOL, R_NONE, OPTFASTREPLY, 0 },
{ "fcc_attach", DT_BOOL, R_NONE, OPTFCCATTACH, 1 },
{
if (linelen == 2 && ch != 'r') from = 0;
else if (linelen == 3 && ch != 'o') from = 0;
- else if (linelen == 4 && ch != 'm') from = 0;
- else if (linelen == 5)
+ else if (linelen == 4)
{
- if (ch == ' ') info->from = 1;
+ if (ch == 'm') info->from = 1;
from = 0;
}
}
{
if (b->type == TYPETEXT)
{
- if (info->lobin)
+ if (info->lobin || (info->from && option (OPTENCODEFROM)))
b->encoding = ENCQUOTEDPRINTABLE;
else if (info->hibin)
b->encoding = option (OPTALLOW8BIT) ? ENC8BIT : ENCQUOTEDPRINTABLE;
else
b->encoding = ENC7BIT;
}
- else if (info->lobin || info->hibin || info->binary || info->linemax > 990)
+ else if (info->lobin || info->hibin || info->binary || info->linemax > 990
+ || (option (OPTENCODEFROM) && info->from))
{
/* Determine which encoding is smaller */
if (1.33 * (float)(info->lobin+info->hibin+info->ascii) < 3.0 * (float) (info->lobin + info->hibin) + (float)info->ascii)