mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-08 04:08:12 -05:00
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:
parent
0578c998e8
commit
e7fdf4dcba
@ -288,7 +288,6 @@ public abstract class ExchangeSession {
|
|||||||
* @param url exchange base URL
|
* @param url exchange base URL
|
||||||
* @param httpClient httpClient instance
|
* @param httpClient httpClient instance
|
||||||
* @return true if basic authentication detected
|
* @return true if basic authentication detected
|
||||||
* @throws IOException unable to connect to exchange
|
|
||||||
*/
|
*/
|
||||||
protected boolean isBasicAuthentication(HttpClient httpClient, String url) {
|
protected boolean isBasicAuthentication(HttpClient httpClient, String url) {
|
||||||
return DavGatewayHttpClientFacade.getHttpStatus(httpClient, url) == HttpStatus.SC_UNAUTHORIZED;
|
return DavGatewayHttpClientFacade.getHttpStatus(httpClient, url) == HttpStatus.SC_UNAUTHORIZED;
|
||||||
@ -1092,7 +1091,11 @@ public abstract class ExchangeSession {
|
|||||||
* @throws IOException on error
|
* @throws IOException on error
|
||||||
*/
|
*/
|
||||||
public List<Folder> getSubFolders(String folderName, boolean recursive) throws IOException {
|
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);
|
recursive);
|
||||||
// need to include base folder in recursive search, except on root
|
// need to include base folder in recursive search, except on root
|
||||||
if (recursive && folderName.length() > 0) {
|
if (recursive && folderName.length() > 0) {
|
||||||
@ -1230,6 +1233,7 @@ public abstract class ExchangeSession {
|
|||||||
*
|
*
|
||||||
* @param mimeMessage MIME message
|
* @param mimeMessage MIME message
|
||||||
* @throws IOException on error
|
* @throws IOException on error
|
||||||
|
* @throws MessagingException on error
|
||||||
*/
|
*/
|
||||||
public abstract void sendMessage(MimeMessage mimeMessage) throws IOException, MessagingException;
|
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,
|
* Folder name can be logical names INBOX, Drafts, Trash or calendar,
|
||||||
* or a path relative to user base folder or absolute path.
|
* or a path relative to user base folder or absolute path.
|
||||||
*
|
*
|
||||||
* @param folderName folder name
|
* @param folderPath folder path
|
||||||
* @return Folder object
|
* @return Folder object
|
||||||
* @throws IOException on error
|
* @throws IOException on error
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user