From: Felipe Contreras <felipe.contreras@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 2/3] reply: add user-agent field
Date: Fri, 10 Dec 2010 00:32:51 +0200 [thread overview]
Message-ID: <1291933972-7186-3-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 | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/notmuch-reply.c b/notmuch-reply.c
index 53a12c5..fc5dac4 100644
--- a/notmuch-reply.c
+++ b/notmuch-reply.c
@@ -447,7 +447,7 @@ 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;
+ const char *message_id, *user_agent;
char *simple_from;
for (messages = notmuch_query_search_messages (query);
@@ -500,6 +500,11 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_
g_mime_object_set_header (GMIME_OBJECT (reply),
"References", references);
+ user_agent = talloc_asprintf (ctx, "notmuch %s",
+ STRINGIFY(NOTMUCH_VERSION));
+ g_mime_object_set_header (GMIME_OBJECT (reply),
+ "User-Agent", user_agent);
+
message_id = talloc_asprintf (ctx, "<%lu-notmuch-%s>",
time(NULL),
simple_from);
--
1.7.3.2
next prev parent reply other threads:[~2010-12-09 22:33 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 ` [PATCH 1/3] reply: add message-id header Felipe Contreras
2010-12-09 22:32 ` Felipe Contreras [this message]
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-3-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).