Menu

#571 Fallback when a "Well known folders" cannot be found

v4.5.0
closed-wont-fix
nobody
None
5
2018-05-24
2014-06-13
No

Davmail cannot find my Draft folder although I can see it in Outlook and in the OWA web interface.

Investigations shows that the response in DavExchangeSession.getWellKnownFolders does not contains any "drafts" entry. I don't know why.

As a workaround I added

davmail.drafts.fallback=Drafts

to my davmail.properties file, and patched davmail this way:

--- src/java/davmail/exchange/dav/DavExchangeSession.java
+++ src/java/davmail/exchange/dav/DavExchangeSession.java
@@ -718,7 +718,11 @@ public class DavExchangeSession extends ExchangeSession {
     protected String getURIPropertyIfExists(DavPropertySet properties, String alias) throws URIException {
         DavProperty property = properties.get(Field.getPropertyName(alias));
         if (property == null) {
-            return null;
+            String fallback = Settings.getProperty("davmail."+alias+".fallback");
+            if(fallback != null)
+                return httpClient.getHostConfiguration().getHostURL() + mailPath + fallback;
+            else
+                return null;
         } else {
             return URIUtil.decode((String) property.getValue());
         }

Discussion

  • Mickael Guessant

    You could also try to fix your mailbox with Outlook command line options, maybe /resetfoldernames

     
  • Jerome Robert

    Jerome Robert - 2014-07-23

    I tried it but it did not work. I also tried to understand why the draft folder was not listed using MAPI editor but I was not to understand the data structure.

     
  • Mickael Guessant

    • status: open --> closed-wont-fix
     
  • Mickael Guessant

    Root cause is a broken mailbox

     

Log in to post a comment.