diff --git a/ActiveSync/SOGoMailObject+ActiveSync.m b/ActiveSync/SOGoMailObject+ActiveSync.m
index 43b55c376..c2993ca7f 100644
--- a/ActiveSync/SOGoMailObject+ActiveSync.m
+++ b/ActiveSync/SOGoMailObject+ActiveSync.m
@@ -754,23 +754,31 @@ struct GlobalObjectId {
len = [content length];
- [s appendString: @"
"];
-
- // Set the correct type if client requested text/html but we got text/plain
- if (preferredBodyType == 2 && nativeBodyType == 1)
- [s appendString: @"1"];
- else
- [s appendFormat: @"%d", preferredBodyType];
-
- [s appendFormat: @"%d", truncated];
- [s appendFormat: @""];
-
- if (!truncated)
+ if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
{
- [s appendFormat: @"%@", content];
- [s appendFormat: @"%d", len];
+ [s appendFormat: @"%@", content];
+ [s appendFormat: @"%d", truncated];
}
- [s appendString: @""];
+ else
+ {
+ [s appendString: @""];
+
+ // Set the correct type if client requested text/html but we got text/plain
+ if (preferredBodyType == 2 && nativeBodyType == 1)
+ [s appendString: @"1"];
+ else
+ [s appendFormat: @"%d", preferredBodyType];
+
+ [s appendFormat: @"%d", truncated];
+ [s appendFormat: @""];
+
+ if (!truncated)
+ {
+ [s appendFormat: @"%@", content];
+ [s appendFormat: @"%d", len];
+ }
+ [s appendString: @""];
+ }
}
// Attachments -namespace 16
diff --git a/NEWS b/NEWS
index d3fd5c1df..ae2da50c5 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Bug fixes
- fixed potential encoding issue using EAS and 8-bit mails (#3116)
- multiple collections support for GetItemEstimate using EAS
- fixed empty sync responses for EAS 2.5 and 12.0 clients
+ - use the correct mail body element for EAS 2.5 clients
2.2.16 (2015-02-12)
-------------------