InternetAddressList *recipients;
char *recipients_string;
const char *reply_to_string;
- char *date_string;
+ void *local = talloc_new (sp);
sp->begin_map (sp);
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->string (sp, g_mime_object_get_header (GMIME_OBJECT (message), "References"));
} else {
sp->map_key (sp, "Date");
- date_string = g_mime_message_get_date_as_string (message);
- sp->string (sp, date_string);
- g_free (date_string);
+ sp->string (sp, g_mime_message_get_date_string (sp, message));
}
sp->end (sp);
+ talloc_free (local);
}
/* Write a MIME text part out to the given stream.
if (recipients_string)
g_mime_stream_printf (stream, "Cc: %s\n", recipients_string);
g_free (recipients_string);
- date_string = g_mime_message_get_date_as_string (message);
+ date_string = g_mime_message_get_date_string (node, message);
g_mime_stream_printf (stream, "Date: %s\n", date_string);
- g_free (date_string);
g_mime_stream_printf (stream, "\fheader}\n");
g_mime_stream_printf (stream, "\fbody{\n");