[evolution-mapi] Camel : Added message threading properties when sending mails.



commit c27631bd13afb12416ea45b8a66b6cbc40cc2563
Author: Johnny Jacob <jjohnny novell com>
Date:   Fri Jun 19 11:34:46 2009 +0530

    Camel : Added message threading properties when sending mails.
    
    * camel-mapi-transport.c (mapi_send_to, mail_build_props): Add Message threading
    information while sending mails.

 src/camel/ChangeLog              |    9 +++++++++
 src/camel/camel-mapi-folder.c    |    7 +++++--
 src/camel/camel-mapi-transport.c |   12 +++++++++++-
 3 files changed, 25 insertions(+), 3 deletions(-)
---
diff --git a/src/camel/ChangeLog b/src/camel/ChangeLog
index 73facd5..f2ecfce 100644
--- a/src/camel/ChangeLog
+++ b/src/camel/ChangeLog
@@ -1,3 +1,12 @@
+2009-06-22  Johnny Jacob  <jjohnny novell com>
+
+	* camel-mapi-transport.c (mapi_send_to, mail_build_props): Add Message threading
+	information while sending mails.
+
+2009-06-19  Johnny Jacob  <jjohnny novell com>
+
+	* camel-mapi-folder.c (mapi_item_free): Free more members.
+
 2009-06-19  Johnny Jacob  <jjohnny novell com>
 
 	* camel-mapi-folder.c (mapi_set_message_id): Added. Sets the message id (mime message id).
diff --git a/src/camel/camel-mapi-folder.c b/src/camel/camel-mapi-folder.c
index d285c7e..95de97f 100644
--- a/src/camel/camel-mapi-folder.c
+++ b/src/camel/camel-mapi-folder.c
@@ -184,12 +184,15 @@ mapi_item_free (MapiItem *item, gpointer data)
 {
 	g_free (item->header.subject);
 	g_free (item->header.from);
-	/* g_free (item->header.from_email); */
-	/* g_free (item->header.from_type); */
+
 	g_free (item->header.to);
 	g_free (item->header.cc);
 	g_free (item->header.bcc);
 
+	g_free (item->header.references);
+	g_free (item->header.message_id);
+	g_free (item->header.in_reply_to);
+
 	exchange_mapi_util_free_attachment_list (&item->attachments);
 	exchange_mapi_util_free_stream_list (&item->generic_streams);
 }
diff --git a/src/camel/camel-mapi-transport.c b/src/camel/camel-mapi-transport.c
index 700ccc2..2af55e6 100644
--- a/src/camel/camel-mapi-transport.c
+++ b/src/camel/camel-mapi-transport.c
@@ -307,6 +307,11 @@ mapi_send_to (CamelTransport *transport, CamelMimeMessage *message,
 		mapi_item_set_subject(item, camel_mime_message_get_subject(message));
 	}
 
+	/*Add message threading properties */
+	item->header.references = g_strdup (camel_medium_get_header ((CamelMedium *) message, "References"));
+	item->header.in_reply_to = g_strdup (camel_medium_get_header ((CamelMedium *) message, "In-Reply-To"));
+	item->header.message_id = g_strdup (camel_medium_get_header ((CamelMedium *) message, "Message-Id"));
+
 	/* contents body */
 	multipart = (CamelMultipart *)camel_medium_get_content_object (CAMEL_MEDIUM (message));
 
@@ -401,7 +406,7 @@ mail_build_props (struct SPropValue **value, struct SPropTagArray *SPropTagArray
 	uint32_t *msgflag = g_new0 (uint32_t, 1);
 	int i=0;
 
-	props = g_new0 (struct SPropValue, 6);
+	props = g_new0 (struct SPropValue, 9);
 
 	set_SPropValue_proptag(&props[i++], PR_CONVERSATION_TOPIC_UNICODE, g_strdup (item->header.subject));
 	set_SPropValue_proptag(&props[i++], PR_NORMALIZED_SUBJECT_UNICODE, g_strdup (item->header.subject));
@@ -409,6 +414,11 @@ mail_build_props (struct SPropValue **value, struct SPropTagArray *SPropTagArray
 	*msgflag = MSGFLAG_UNSENT;
 	set_SPropValue_proptag(&props[i++], PR_MESSAGE_FLAGS, (void *)msgflag);
 
+	/* Message threading information */
+	set_SPropValue_proptag(&props[i++], PR_INTERNET_REFERENCES, g_strdup (item->header.references));
+	set_SPropValue_proptag(&props[i++], PR_IN_REPLY_TO_ID, g_strdup (item->header.in_reply_to));
+	set_SPropValue_proptag(&props[i++], PR_INTERNET_MESSAGE_ID, g_strdup (item->header.message_id));
+
 	for (l = item->msg.body_parts; l; l = l->next) {
 		ExchangeMAPIStream *stream = (ExchangeMAPIStream *) (l->data);
 		struct SBinary_short *bin = g_new0 (struct SBinary_short, 1);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]