[evolution-ews/gnome-3-6] Bug #689521 - Delivery notification reply fails to send



commit 58796b770d036e7a460f5ff1644180278bc52767
Author: Milan Crha <mcrha redhat com>
Date:   Mon Dec 10 21:38:36 2012 +0100

    Bug #689521 - Delivery notification reply fails to send

 src/utils/ews-camel-common.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/utils/ews-camel-common.c b/src/utils/ews-camel-common.c
index 54edaba..e4e5606 100644
--- a/src/utils/ews-camel-common.c
+++ b/src/utils/ews-camel-common.c
@@ -46,6 +46,7 @@ create_mime_message_cb (ESoapMessage *msg,
 	struct _create_mime_msg_data *create_data = user_data;
 	CamelStream *mem, *filtered;
 	CamelMimeFilter *filter;
+	CamelContentType *content_type;
 	GByteArray *bytes;
 	gchar *base64;
 	gint msgflag;
@@ -87,6 +88,16 @@ create_mime_message_cb (ESoapMessage *msg,
 
 	e_soap_message_end_element (msg); /* MimeContent */
 
+	content_type = camel_mime_part_get_content_type (CAMEL_MIME_PART (create_data->message));
+	if (content_type && camel_content_type_is (content_type, "multipart", "report") &&
+	    camel_content_type_param (content_type, "report-type") &&
+	    g_ascii_strcasecmp (camel_content_type_param (content_type, "report-type"), "disposition-notification") == 0) {
+		/* it's a disposition notification reply, set ItemClass too */
+		e_soap_message_start_element (msg, "ItemClass", NULL, NULL);
+		e_soap_message_write_string (msg, "REPORT.IPM.NOTE.IPNRN");
+		e_soap_message_end_element (msg); /* ItemClass */
+	}
+
 	/* more MAPI crap.  You can't just set the IsDraft property
 	 * here you have to use the MAPI MSGFLAG_UNSENT extended
 	 * property Further crap is that Exchange 2007 assumes when it



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