- printf ("{%s: %s",
- json_quote_str (local, "Subject"),
- json_quote_str (local, g_mime_message_get_subject (message)));
- printf (", %s: %s",
- json_quote_str (local, "From"),
- json_quote_str (local, 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);
- if (recipients_string)
- printf (", %s: %s",
- json_quote_str (local, "To"),
- json_quote_str (local, recipients_string));
- recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_CC);
- recipients_string = internet_address_list_to_string (recipients, 0);
- if (recipients_string)
- printf (", %s: %s",
- json_quote_str (local, "Cc"),
- json_quote_str (local, recipients_string));
- printf (", %s: %s}",
- json_quote_str (local, "Date"),
- json_quote_str (local, g_mime_message_get_date_as_string (message)));
+ sp->map_key (sp, "References");
+ sp->string (sp, g_mime_object_get_header (GMIME_OBJECT (message), "References"));
+ } else {
+ sp->map_key (sp, "Date");
+ sp->string (sp, g_mime_message_get_date_as_string (message));
+ }