diff --git a/ActiveSync/SOGoMailObject+ActiveSync.m b/ActiveSync/SOGoMailObject+ActiveSync.m index 48c52e13f..efe8fdfe0 100644 --- a/ActiveSync/SOGoMailObject+ActiveSync.m +++ b/ActiveSync/SOGoMailObject+ActiveSync.m @@ -60,6 +60,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #import #import #import +#import #import #import #import @@ -478,6 +479,14 @@ struct GlobalObjectId { RELEASE(fdata); *b = YES; } + else if ([[(NGMimeContentDispositionHeaderField *)[thePart headerForKey: @"content-disposition"] type] hasPrefix: @"attachment"] || + [[(NGMimeContentDispositionHeaderField *)[thePart headerForKey: @"content-disposition"] type] hasPrefix: @"inline"]) + { + [thePart setHeader: @"base64" forKey: @"content-transfer-encoding"]; + [thePart setBody: [body dataByEncodingBase64]]; + [thePart setHeader: [NSString stringWithFormat:@"%d", (int)[[thePart body] length]] + forKey: @"content-length"]; + } } }