From 9cced0c472867b41adc25bb93f54204302250433 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 18 Feb 2010 19:37:08 +0000 Subject: [PATCH] Monotone-Parent: a02d7acbde3aa1019073525f5b106dac9819e84e Monotone-Revision: bdf65f02baa631ebd76f9f0287be848a1cfef6c6 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-02-18T19:37:08 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ SoObjects/Appointments/SOGoCalendarComponent.m | 12 +++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 93b5b1524..9aa35dd55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2010-02-18 Wolfgang Sourdeau + * SoObjects/Appointments/SOGoCalendarComponent.m + (-sendEMailUsingTemplateNamed:forObject:previousObject:toAttendees:): + added a few headers to the ical attachment that could help + work-around bugs occurring with Outlook: content-disposition = + inline, content-transfer-encoding = qp. Moreover a \r\n is added + to the iCalString. + * SoObjects/SOGo/SOGoCache.m: worked around in bug in GCC occurring with libmemcached >= 0.37 by making the servers and handle ivars static globals. diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index c7707699c..96cfc7305 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -649,7 +649,7 @@ static inline BOOL _occurenceHasID (iCalRepeatableEntityObject *occurence, NSStr toAttendees: (NSArray *) attendees { NSString *pageName; - NSString *senderEmail, *shortSenderEmail, *email, *iCalString; + NSString *senderEmail, *shortSenderEmail, *email, *versitString, *iCalString; WOApplication *app; unsigned i, count; iCalPerson *attendee; @@ -681,7 +681,8 @@ static inline BOOL _occurenceHasID (iCalRepeatableEntityObject *occurence, NSStr // NSLog (@"sending '%@' from %@", // [(iCalCalendar *) [object parent] method], senderEmail); /* generate iCalString once */ - iCalString = [[object parent] versitString]; + versitString = [[object parent] versitString]; + iCalString = [NSString stringWithFormat: @"%@\r\n", versitString]; /* get WOApplication instance */ app = [WOApplication application]; @@ -760,8 +761,13 @@ static inline BOOL _occurenceHasID (iCalRepeatableEntityObject *occurence, NSStr [(iCalCalendar *) [object parent] method]]; headerMap = [NGMutableHashMap hashMapWithCapacity: 1]; [headerMap setObject:header forKey: @"content-type"]; + [headerMap setObject: @"inline" + forKey: @"content-disposition"]; + [headerMap setObject: @"quoted-printable" + forKey: @"content-transfer-encoding"]; bodyPart = [NGMimeBodyPart bodyPartWithHeader: headerMap]; - [bodyPart setBody: [iCalString dataUsingEncoding: NSUTF8StringEncoding]]; + [bodyPart setBody: [[iCalString dataUsingEncoding: NSUTF8StringEncoding] + dataByEncodingQuotedPrintable]]; /* attach calendar part to multipart body */ [body addBodyPart: bodyPart];