IMAP: new davmail.imapIncludeSpecialFolders setting to access all folders including calendar and tasks over IMAP

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1853 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2011-11-09 10:13:03 +00:00
parent 0578c998e8
commit e7fdf4dcba
1 changed files with 7 additions and 3 deletions

View File

@ -288,7 +288,6 @@ public abstract class ExchangeSession {
* @param url exchange base URL
* @param httpClient httpClient instance
* @return true if basic authentication detected
* @throws IOException unable to connect to exchange
*/
protected boolean isBasicAuthentication(HttpClient httpClient, String url) {
return DavGatewayHttpClientFacade.getHttpStatus(httpClient, url) == HttpStatus.SC_UNAUTHORIZED;
@ -1092,7 +1091,11 @@ public abstract class ExchangeSession {
* @throws IOException on error
*/
public List<Folder> getSubFolders(String folderName, boolean recursive) throws IOException {
List<Folder> results = getSubFolders(folderName, or(isEqualTo("folderclass", "IPF.Note"), isNull("folderclass")),
Condition folderCondition = null;
if (!Settings.getBooleanProperty("davmail.imapIncludeSpecialFolders", false)) {
folderCondition = or(isEqualTo("folderclass", "IPF.Note"), isNull("folderclass"));
}
List<Folder> results = getSubFolders(folderName, folderCondition,
recursive);
// need to include base folder in recursive search, except on root
if (recursive && folderName.length() > 0) {
@ -1230,6 +1233,7 @@ public abstract class ExchangeSession {
*
* @param mimeMessage MIME message
* @throws IOException on error
* @throws MessagingException on error
*/
public abstract void sendMessage(MimeMessage mimeMessage) throws IOException, MessagingException;
@ -1238,7 +1242,7 @@ public abstract class ExchangeSession {
* Folder name can be logical names INBOX, Drafts, Trash or calendar,
* or a path relative to user base folder or absolute path.
*
* @param folderName folder name
* @param folderPath folder path
* @return Folder object
* @throws IOException on error
*/