From: Felipe Contreras <felipe.contreras@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 1/3] reply: add message-id header
Date: Fri, 10 Dec 2010 00:32:50 +0200 [thread overview]
Message-ID: <1291933972-7186-2-git-send-email-felipe.contreras@gmail.com> (raw)
In-Reply-To: <1291933972-7186-1-git-send-email-felipe.contreras@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
notmuch-reply.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/notmuch-reply.c b/notmuch-reply.c
index 23d04b8..53a12c5 100644
--- a/notmuch-reply.c
+++ b/notmuch-reply.c
@@ -447,6 +447,8 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_
notmuch_message_t *message;
const char *subject, *from_addr = NULL;
const char *in_reply_to, *orig_references, *references;
+ const char *message_id;
+ char *simple_from;
for (messages = notmuch_query_search_messages (query);
notmuch_messages_valid (messages);
@@ -476,6 +478,8 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_
if (from_addr == NULL)
from_addr = notmuch_config_get_user_primary_email (config);
+ simple_from = talloc_strdup (ctx, from_addr);
+
from_addr = talloc_asprintf (ctx, "%s <%s>",
notmuch_config_get_user_name (config),
from_addr);
@@ -496,6 +500,13 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_
g_mime_object_set_header (GMIME_OBJECT (reply),
"References", references);
+ message_id = talloc_asprintf (ctx, "<%lu-notmuch-%s>",
+ time(NULL),
+ simple_from);
+ g_mime_object_set_header (GMIME_OBJECT (reply),
+ "Message-ID", message_id);
+ talloc_free (simple_from);
+
show_reply_headers (reply);
g_object_unref (G_OBJECT (reply));
--
1.7.3.2
next prev parent reply other threads:[~2010-12-09 22:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 22:32 [PATCH 0/3] composing patches Felipe Contreras
2010-12-09 22:32 ` Felipe Contreras [this message]
2010-12-09 22:32 ` [PATCH 2/3] reply: add user-agent field Felipe Contreras
2010-12-09 22:32 ` =?no?q?=5BPATCH=203/3=5D=20Add=20=27compose=27=20command?= Felipe Contreras
2010-12-09 23:20 ` [PATCH 0/3] composing patches Sebastian Spaeth
2010-12-10 15:35 ` Felipe Contreras
2010-12-10 16:04 ` Jameson Rollins
2010-12-10 16:38 ` Sebastian Spaeth
2010-12-10 23:53 ` Michal Sojka
2011-05-04 20:30 ` Felipe Contreras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291933972-7186-2-git-send-email-felipe.contreras@gmail.com \
--to=felipe.contreras@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).