From 6d372364756b98ec1bd22810c3b9bf7a9a514c71 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 27 Feb 2001 02:59:48 +0000 Subject: Set a "References" header no matter what if we are able to get a 2001-02-26 Jeffrey Stedfast * mail-callbacks.c (mail_generate_reply): Set a "References" header no matter what if we are able to get a Message-Id. Fixes bug #1583. * mail-accounts.c (mail_delete): Confirm that the user REALLY wants to delete this account. (news_delete): Same. * mail-ops.c (mail_send_message): Changed the product string - will change it to use User-Agent once I get the RFC/DRUMS draft or whatever. Until then I'll stick with User-Agent. svn path=/trunk/; revision=8399 --- mail/mail-callbacks.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'mail/mail-callbacks.c') diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 1cbb3c2783..ae64e6f116 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -617,18 +617,20 @@ mail_generate_reply (CamelMimeMessage *message, gboolean to_all) g_free (subject); /* Add In-Reply-To and References. */ - message_id = camel_medium_get_header (CAMEL_MEDIUM (message), - "Message-Id"); - references = camel_medium_get_header (CAMEL_MEDIUM (message), - "References"); + message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-Id"); + references = camel_medium_get_header (CAMEL_MEDIUM (message), "References"); if (message_id) { + char *reply_refs; + e_msg_composer_add_header (composer, "In-Reply-To", message_id); - if (references) { - char *reply_refs; + + if (references) reply_refs = g_strdup_printf ("%s %s", references, message_id); - e_msg_composer_add_header (composer, "References", reply_refs); - g_free (reply_refs); - } + else + reply_refs = g_strdup (message_id); + + e_msg_composer_add_header (composer, "References", reply_refs); + g_free (reply_refs); } else if (references) { e_msg_composer_add_header (composer, "References", references); } -- cgit