EWS: avoid NullPointerException in broken message rebuild

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1927 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2012-03-19 23:42:56 +00:00
parent cfbb41dcde
commit b66a3a6ebf
1 changed files with 3 additions and 0 deletions

View File

@ -531,6 +531,9 @@ public class EwsExchangeSession extends ExchangeSession {
mimeMessage.addHeader("Cc", item.get(Field.get("cc").getResponseName()));
mimeMessage.setSubject(item.get(Field.get("subject").getResponseName()));
String propertyValue = item.get(Field.get("body").getResponseName());
if (propertyValue == null) {
propertyValue = "";
}
mimeMessage.setContent(propertyValue, "text/html");
mimeMessage.writeTo(baos);