mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-15 03:41:22 +00:00
Monotone-Parent: 08c6872fb6a9c8bafc542d62b81e555faf5e1c05
Monotone-Revision: 07f66207968bbc8815cccf3c0b6d5147e13d8ab6 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-10-25T18:19:08 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
|
||||
#import "MAPIStoreContext.h"
|
||||
#import "MAPIStoreMapping.h"
|
||||
#import "MAPIStoreMIME.h"
|
||||
#import "MAPIStoreTypes.h"
|
||||
#import "NSData+MAPIStore.h"
|
||||
#import "NSObject+MAPIStore.h"
|
||||
@@ -337,10 +338,6 @@ typedef void (*getMessageData_inMemCtx_) (MAPIStoreMessage *, SEL,
|
||||
|
||||
attachment = [attachmentParts objectForKey: attachmentKey];
|
||||
properties = [attachment newProperties];
|
||||
mimeType = [properties
|
||||
objectForKey: MAPIPropertyKey (PR_ATTACH_MIME_TAG_UNICODE)];
|
||||
if (!mimeType)
|
||||
mimeType = @"application/octet-stream";
|
||||
filename
|
||||
= [properties
|
||||
objectForKey: MAPIPropertyKey (PR_ATTACH_LONG_FILENAME_UNICODE)];
|
||||
@@ -353,6 +350,14 @@ typedef void (*getMessageData_inMemCtx_) (MAPIStoreMessage *, SEL,
|
||||
filename = @"untitled.bin";
|
||||
}
|
||||
|
||||
mimeType = [properties
|
||||
objectForKey: MAPIPropertyKey (PR_ATTACH_MIME_TAG_UNICODE)];
|
||||
if (!mimeType)
|
||||
mimeType = [[MAPIStoreMIME sharedMAPIStoreMIME]
|
||||
mimeTypeForExtension: [filename pathExtension]];
|
||||
if (!mimeType)
|
||||
mimeType = @"application/octet-stream";
|
||||
|
||||
content = [properties objectForKey: MAPIPropertyKey (PR_ATTACH_DATA_BIN)];
|
||||
if (content)
|
||||
{
|
||||
@@ -614,7 +619,8 @@ e)
|
||||
[self logWithFormat: @"sending message"];
|
||||
[self _commitProperties];
|
||||
error = [(SOGoDraftObject *) sogoObject sendMailAndCopyToSent: NO];
|
||||
[self errorWithFormat: @"an exception occurred: %@", error];
|
||||
if (error)
|
||||
[self errorWithFormat: @"an exception occurred: %@", error];
|
||||
}
|
||||
else
|
||||
[self logWithFormat: @"ignored scheduling message"];
|
||||
|
||||
Reference in New Issue
Block a user