X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-show.c;h=1a72d12f68cab3980b4273d8de8b917b39c9dbc4;hp=78d46f1ef1af335a9c677aa4a67eda5b55cea07d;hb=cbb2d5608ef6dd54d6e9e19b2bb570d3fe54b28b;hpb=67dbd24ece883e9cb0258fce289e40ca276b729d diff --git a/notmuch-show.c b/notmuch-show.c index 78d46f1e..1a72d12f 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -204,6 +204,7 @@ format_headers_sprinter (sprinter_t *sp, GMimeMessage *message, InternetAddressList *recipients; char *recipients_string; const char *reply_to_string; + void *local = talloc_new (sp); sp->begin_map (sp); @@ -211,7 +212,7 @@ format_headers_sprinter (sprinter_t *sp, GMimeMessage *message, sp->string (sp, g_mime_message_get_subject (message)); sp->map_key (sp, "From"); - sp->string (sp, g_mime_message_get_sender (message)); + sp->string (sp, g_mime_message_get_from_string (message)); recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_TO); recipients_string = internet_address_list_to_string (recipients, 0); @@ -237,7 +238,7 @@ format_headers_sprinter (sprinter_t *sp, GMimeMessage *message, g_free (recipients_string); } - reply_to_string = g_mime_message_get_reply_to (message); + reply_to_string = g_mime_message_get_reply_to_string (local, message); if (reply_to_string) { sp->map_key (sp, "Reply-To"); sp->string (sp, reply_to_string); @@ -255,6 +256,7 @@ format_headers_sprinter (sprinter_t *sp, GMimeMessage *message, } sp->end (sp); + talloc_free (local); } /* Write a MIME text part out to the given stream. @@ -518,9 +520,9 @@ format_part_text (const void *ctx, sprinter_t *sp, mime_node_t *node, if (node->envelope_file) g_mime_stream_printf (stream, "%s\n", _get_one_line_summary (ctx, node->envelope_file)); g_mime_stream_printf (stream, "Subject: %s\n", g_mime_message_get_subject (message)); - g_mime_stream_printf (stream, "From: %s\n", g_mime_message_get_sender (message)); recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_TO); recipients_string = internet_address_list_to_string (recipients, 0); + g_mime_stream_printf (stream, "From: %s\n", g_mime_message_get_from_string (message)); if (recipients_string) g_mime_stream_printf (stream, "To: %s\n", recipients_string); g_free (recipients_string);