mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-05 18:58:02 -05:00
Fix 3602351, detect missing item
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2069 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
32dd469942
commit
6a455d0a8c
@ -585,6 +585,10 @@ public class EwsExchangeSession extends ExchangeSession {
|
||||
executeMethod(getItemMethod);
|
||||
EWSMethod.Item item = getItemMethod.getResponseItem();
|
||||
|
||||
if (item == null) {
|
||||
throw new HttpNotFoundException("Item " + itemId + " not found");
|
||||
}
|
||||
|
||||
MimeMessage mimeMessage = new MimeMessage((Session) null);
|
||||
mimeMessage.addHeader("Content-class", item.get(Field.get("contentclass").getResponseName()));
|
||||
mimeMessage.setSentDate(parseDateFromExchange(item.get(Field.get("date").getResponseName())));
|
||||
|
Loading…
Reference in New Issue
Block a user