InternetAddressList *recipients;
char *recipients_string;
const char *reply_to_string;
+ void *local = talloc_new (sp);
sp->begin_map (sp);
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);
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);
}
sp->end (sp);
+ talloc_free (local);
}
/* Write a MIME text part out to the given stream.
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);