hdr->content->hdr_offset = hdr->offset;
hdr->content->offset = ftello (f);
- /* do RFC2047 decoding */
- 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_envelope (e);
if (e->subject)
{
regmatch_t pmatch[1];
- rfc2047_decode (&e->subject);
-
if (regexec (ReplyRegexp.rx, e->subject, 1, pmatch, 0) == 0)
e->real_subj = e->subject + pmatch[0].rm_eo;
else
a = a->next;
}
}
+
+void rfc2047_decode_envelope (ENVELOPE *e)
+{
+ 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);
+}
void rfc2047_decode (char **);
void rfc2047_decode_adrlist (ADDRESS *);
+void rfc2047_decode_envelope (ENVELOPE *);
rfc822_free_address (&env->mail_followup_to);
/* back conversions */
- rfc2047_decode_adrlist (env->to);
- rfc2047_decode_adrlist (env->cc);
- rfc2047_decode_adrlist (env->bcc);
- rfc2047_decode_adrlist (env->from);
- rfc2047_decode_adrlist (env->reply_to);
- rfc2047_decode (&env->subject);
- rfc2047_decode (&env->x_label);
+ rfc2047_decode_envelope (env);
}
static int _mutt_bounce_message (FILE *fp, HEADER *h, ADDRESS *to, const char *resent_from,
}
/* 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);
+ rfc2047_decode_envelope (e);
rc = 0;