- printf ("Cc: %s\n", recipients_string);
- printf ("Date: %s\n", g_mime_message_get_date_as_string (message));
- printf ("\fheader}\n");
-
- printf ("\fbody{\n");
+ g_mime_stream_printf (stream, "Cc: %s\n", recipients_string);
+ g_free (recipients_string);
+ date_string = g_mime_message_get_date_as_string (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");