List of usage examples for javax.mail.event FolderEvent DELETED
int DELETED
To view the source code for javax.mail.event FolderEvent DELETED.
Click Source Link
From source file:org.sourceforge.net.javamail4ews.store.EwsFolder.java
@Override public boolean delete(boolean recurse) throws MessagingException { if (isOpen()) { throw new IllegalStateException("Folder not closed!"); }//from w ww.j a va 2 s . c om try { if (recurse) { for (javax.mail.Folder aFolder : list()) { aFolder.delete(recurse); } } else { // Simplest approach if (getMessageCount() > 0) { return false; } } folder.delete(DELETE_MODE); notifyFolderListeners(FolderEvent.DELETED); return true; } catch (Exception e) { throw new MessagingException(e.getMessage(), e); } }