diff --git a/OpenChange/MAPIStoreCalendarMessage.m b/OpenChange/MAPIStoreCalendarMessage.m index 9e2952102..79a11e58b 100644 --- a/OpenChange/MAPIStoreCalendarMessage.m +++ b/OpenChange/MAPIStoreCalendarMessage.m @@ -494,6 +494,7 @@ static Class NSArrayK, MAPIStoreAppointmentWrapperK; folder = [sogoObject container]; /* reinstantiate the old sogo object and attach it to self */ + [[self userContext] activate]; woContext = [[self userContext] woContext]; if (isNew) { diff --git a/OpenChange/MAPIStoreMailMessage.m b/OpenChange/MAPIStoreMailMessage.m index 77ab5be40..37d4fc420 100644 --- a/OpenChange/MAPIStoreMailMessage.m +++ b/OpenChange/MAPIStoreMailMessage.m @@ -1614,6 +1614,8 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data) max = [keyParts count]; if (max > 0) { + [[self userContext] activate]; + currentPart = [sogoObject lookupName: [keyParts objectAtIndex: 0] inContext: nil acquire: NO]; diff --git a/OpenChange/MAPIStoreMailVolatileMessage.m b/OpenChange/MAPIStoreMailVolatileMessage.m index 33c803173..ca9f1c42e 100644 --- a/OpenChange/MAPIStoreMailVolatileMessage.m +++ b/OpenChange/MAPIStoreMailVolatileMessage.m @@ -1077,6 +1077,7 @@ MakeMessageBody (NSDictionary *mailProperties, NSDictionary *attachmentParts, NS dd = [activeUser domainDefaults]; from = [[activeUser allEmails] objectAtIndex: 0]; + [[self userContext] activate]; woContext = [[self userContext] woContext]; authenticator = [sogoObject authenticatorInContext: woContext]; error = [[SOGoMailer mailerWithDomainDefaults: dd]