else
{
char *scratch;
- char *decoded_value;
size_t taglen = mutt_strlen (tag);
- decoded_value = safe_strdup (value);
- rfc2047_decode (&decoded_value);
-
- safe_asprintf (&scratch, "%s: %s", tag, decoded_value);
+ safe_asprintf (&scratch, "%s: %s", tag, value);
scratch[taglen] = 0; /* overwrite the colon as mutt_parse_rfc822_line expects */
value = skip_email_wsp(&scratch[taglen + 1]);
- mutt_parse_rfc822_line (e, NULL, scratch, value, 1, 0, 0, &last);
- FREE (&decoded_value);
+ mutt_parse_rfc822_line (e, NULL, scratch, value, 1, 0, 1, &last);
FREE (&scratch);
}
}
}
+ /* RFC2047 decode after the RFC822 parsing */
+ rfc2047_decode_adrlist (e->from);
+ rfc2047_decode_adrlist (e->to);
+ rfc2047_decode_adrlist (e->cc);
+ rfc2047_decode_adrlist (e->bcc);
+ rfc2047_decode_adrlist (e->reply_to);
+ rfc2047_decode_adrlist (e->mail_followup_to);
+ rfc2047_decode_adrlist (e->return_path);
+ rfc2047_decode_adrlist (e->sender);
+ rfc2047_decode (&e->x_label);
+ rfc2047_decode (&e->subject);
+
rc = 0;
out: