Moyosoft Products | Services | Download | Contact us    
Java Outlook Connector
Products  >  Java Outlook Connector  >  API Reference    
API Reference
Overview  |  
Classic JavaDoc


public void delete()

Delete this item.

true if the operation was successful; false otherwise.


Community comments

Deleting permanently
Vote up  |  Vote down
The delete() method moves the item to the Trash folder.

Use the method ItemsCollection.remove(int index) to remove the item from the folder without moving it to the Trash.

Vote up  |  Vote down
To check if an item is deleted, have to find out if it's stored in the Deleted Items folder:

    private static boolean isDeleted(Outlook outlook, OutlookItem item)
        OutlookFolderID trashFolderId =

        OutlookFolder parentFolder = item.getParentFolder();

        while(parentFolder != null)
                return true;
            parentFolder = parentFolder.getParentFolder();
        return false;

Powered by JavaDocPlus