(fix) handle emails having an attachment as their content
parent
350fe2e7e0
commit
ab322093cd
2
NEWS
2
NEWS
|
@ -27,7 +27,7 @@ Bug fixes
|
|||
- freebusy on web interface works again in multidomain environments (Zentyal)
|
||||
- fix double creation of folders in Outlook when the folder name starts with a digit (Zentyal)
|
||||
- avoid crashing Outlook after setting a custom view in a calendar folder (Zentyal)
|
||||
|
||||
- handle emails having an attachment as their content
|
||||
|
||||
2.3.2 (2015-09-16)
|
||||
------------------
|
||||
|
|
|
@ -389,8 +389,11 @@ static BOOL debugSoParts = NO;
|
|||
[[[info valueForKey: @"subtype"] lowercaseString] isEqualToString: @"calendar"])
|
||||
return info;
|
||||
|
||||
if ([[[info valueForKey: @"type"] lowercaseString] isEqualToString: @"application"] &&
|
||||
[[[info valueForKey: @"subtype"] lowercaseString] isEqualToString: @"pkcs7-mime"])
|
||||
// deal with mails that contain only an attachment, for example:
|
||||
// application/pkcs7-mime
|
||||
// application/pdf
|
||||
// etc.
|
||||
if ([[[info valueForKey: @"type"] lowercaseString] isEqualToString: @"application"])
|
||||
return info;
|
||||
|
||||
/*
|
||||
|
@ -1044,6 +1047,14 @@ static BOOL debugSoParts = NO;
|
|||
return obj;
|
||||
}
|
||||
}
|
||||
// Handles cases where the email is itself an attachment, so its Content-Type
|
||||
// is application/*, image/* etc.
|
||||
else if ([_key isEqualToString: @"asAttachment"] &&
|
||||
(obj = [self lookupImap4BodyPartKey: @"0" inContext:_ctx]) != nil)
|
||||
{
|
||||
[obj setAsAttachment];
|
||||
return obj;
|
||||
}
|
||||
|
||||
/* return 404 to stop acquisition */
|
||||
return [NSException exceptionWithHTTPStatus:404 /* Not Found */
|
||||
|
|
Loading…
Reference in New Issue