mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 11:12:22 -05:00
EWS: implement sendEvent
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1311 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
b1c0c7c32e
commit
b2496a60e6
@ -1062,7 +1062,15 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int sendEvent(String icsBody) throws IOException {
|
public int sendEvent(String icsBody) throws IOException {
|
||||||
throw new UnsupportedOperationException();
|
String itemName = UUID.randomUUID().toString() + ".EML";
|
||||||
|
byte[] mimeContent = new Event(DRAFTS, itemName, "urn:content-classes:calendarmessage", icsBody, null, null).createMimeContent();
|
||||||
|
if (mimeContent == null) {
|
||||||
|
// no recipients, cancel
|
||||||
|
return HttpStatus.SC_NO_CONTENT;
|
||||||
|
} else {
|
||||||
|
sendMessage(mimeContent);
|
||||||
|
return HttpStatus.SC_OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1206,7 +1214,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected static boolean isItemId(String itemName) {
|
protected static boolean isItemId(String itemName) {
|
||||||
return itemName.length() == 156;
|
return itemName.length() == 156;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user