- /* The 0 means we do not want headers in a "pretty" order. */
- reply = g_mime_message_new (0);
- if (reply == NULL) {
- fprintf (stderr, "Out of memory\n");
- return 1;
- }
-
- in_reply_to = talloc_asprintf (ctx, "<%s>",
- notmuch_message_get_message_id (message));
-
- g_mime_object_set_header (GMIME_OBJECT (reply),
- "In-Reply-To", in_reply_to);
-
-
- orig_references = notmuch_message_get_header (message, "references");
-
- /* We print In-Reply-To followed by References because git format-patch treats them
- * specially. Git does not interpret the other headers specially
- */
- references = talloc_asprintf (ctx, "%s%s%s",
- orig_references ? orig_references : "",
- orig_references ? " " : "",
- in_reply_to);
- g_mime_object_set_header (GMIME_OBJECT (reply),
- "References", references);
-
- (void)add_recipients_from_message (reply, config, message, reply_all);
-
- reply_headers = g_mime_object_to_string (GMIME_OBJECT (reply));
- printf ("%s", reply_headers);
- free (reply_headers);
-
- g_object_unref (G_OBJECT (reply));
- reply = NULL;