diff --git a/src/java/davmail/exchange/ExchangeSession.java b/src/java/davmail/exchange/ExchangeSession.java index 8b1288ec..6fe44c73 100644 --- a/src/java/davmail/exchange/ExchangeSession.java +++ b/src/java/davmail/exchange/ExchangeSession.java @@ -1013,6 +1013,7 @@ public abstract class ExchangeSession { * Create Exchange calendar folder. * * @param folderName logical folder name + * @param properties folder properties * @throws IOException on error * @return status */ @@ -1024,6 +1025,7 @@ public abstract class ExchangeSession { * Create Exchange contact folder. * * @param folderName logical folder name + * @param properties folder properties * @throws IOException on error * @return status */ @@ -1036,6 +1038,7 @@ public abstract class ExchangeSession { * * @param folderName logical folder name * @param folderClass folder class + * @param properties folder properties * @return status * @throws IOException on error */ @@ -1350,15 +1353,6 @@ public abstract class ExchangeSession { return uid; } - /** - * Return permanent message url. - * - * @return permanent message url - */ - public String getPermanentUrl() { - return permanentUrl; - } - /** * Return message flags in IMAP format. * @@ -1719,6 +1713,9 @@ public abstract class ExchangeSession { writer.appendProperty("TEL;TYPE=fax", get("facsimiletelephonenumber")); writer.appendProperty("TEL;TYPE=pager", get("pager")); writer.appendProperty("TEL;TYPE=car", get("othermobile")); + writer.appendProperty("TEL;TYPE=home,fax", get("homefax")); + writer.appendProperty("TEL;TYPE=isdn", get("internationalisdnnumber")); + writer.appendProperty("TEL;TYPE=msg", get("otherTelephone")); // The structured type value corresponds, in sequence, to the post office box; the extended address; // the street address; the locality (e.g., city); the region (e.g., state or province); @@ -2780,21 +2777,22 @@ public abstract class ExchangeSession { } else if ("TEL".equals(property.getKey())) { if (property.hasParam("TYPE", "cell") || property.hasParam("X-GROUP", "cell")) { properties.put("mobile", property.getValue()); - } - if (property.hasParam("TYPE", "work") || property.hasParam("X-GROUP", "work")) { + } else if (property.hasParam("TYPE", "work") || property.hasParam("X-GROUP", "work")) { properties.put("telephoneNumber", property.getValue()); - } - if (property.hasParam("TYPE", "home") || property.hasParam("X-GROUP", "home")) { + } else if (property.hasParam("TYPE", "home") || property.hasParam("X-GROUP", "home")) { properties.put("homePhone", property.getValue()); - } - if (property.hasParam("TYPE", "fax")) { - properties.put("facsimiletelephonenumber", property.getValue()); - } - if (property.hasParam("TYPE", "pager")) { + } else if (property.hasParam("TYPE", "fax")) { + if (property.hasParam("TYPE", "home")) { + properties.put("homefax", property.getValue()); + } else { + properties.put("facsimiletelephonenumber", property.getValue()); + } + } else if (property.hasParam("TYPE", "pager")) { properties.put("pager", property.getValue()); - } - if (property.hasParam("TYPE", "car")) { + } else if (property.hasParam("TYPE", "car")) { properties.put("othermobile", property.getValue()); + } else { + properties.put("otherTelephone", property.getValue()); } } else if ("ADR".equals(property.getKey())) { // address @@ -2802,7 +2800,8 @@ public abstract class ExchangeSession { convertContactProperties(properties, VCARD_ADR_HOME_PROPERTIES, property.getValues()); } else if (property.hasParam("TYPE", "work")) { convertContactProperties(properties, VCARD_ADR_WORK_PROPERTIES, property.getValues()); - } else if (property.hasParam("TYPE", "other")) { + // any other type goes to other address + } else { convertContactProperties(properties, VCARD_ADR_OTHER_PROPERTIES, property.getValues()); } } else if ("EMAIL".equals(property.getKey())) { @@ -3260,6 +3259,7 @@ public abstract class ExchangeSession { CONTACT_ATTRIBUTES.add("haspicture"); CONTACT_ATTRIBUTES.add("keywords"); CONTACT_ATTRIBUTES.add("othermobile"); + CONTACT_ATTRIBUTES.add("otherTelephone"); CONTACT_ATTRIBUTES.add("gender"); CONTACT_ATTRIBUTES.add("private"); CONTACT_ATTRIBUTES.add("sensitivity"); diff --git a/src/java/davmail/exchange/dav/Field.java b/src/java/davmail/exchange/dav/Field.java index 294f8e52..09a09c32 100644 --- a/src/java/davmail/exchange/dav/Field.java +++ b/src/java/davmail/exchange/dav/Field.java @@ -239,7 +239,10 @@ public class Field { createField("description", URN_SCHEMAS_HTTPMAIL, "textdescription"); // PR_BODY 0x1000 String createField("im", SCHEMAS_MAPI, "InstMsg"); // InstantMessagingAddress DistinguishedPropertySetType.Address/0x00008062/String createField(URN_SCHEMAS_CONTACTS, "othermobile"); // PR_CAR_TELEPHONE_NUMBER 0x3A1E String + createField(URN_SCHEMAS_CONTACTS, "internationalisdnnumber"); // PR_ISDN_NUMBER 0x3A2D String + createField(URN_SCHEMAS_CONTACTS, "otherTelephone"); // PR_OTHER_TELEPHONE_NUMBER 0x3A21 String + createField(URN_SCHEMAS_CONTACTS, "homefax"); // PR_HOME_FAX_NUMBER 0x3A25 String createField(URN_SCHEMAS_CONTACTS, "otherstreet"); // PR_OTHER_ADDRESS_STREET 0x3A63 String createField(URN_SCHEMAS_CONTACTS, "otherstate"); // PR_OTHER_ADDRESS_STATE_OR_PROVINCE 0x3A62 String diff --git a/src/java/davmail/exchange/ews/Field.java b/src/java/davmail/exchange/ews/Field.java index 1e04594b..51dbdb7e 100644 --- a/src/java/davmail/exchange/ews/Field.java +++ b/src/java/davmail/exchange/ews/Field.java @@ -144,6 +144,10 @@ public class Field { FIELD_MAP.put("description", new ExtendedFieldURI(0x1000, ExtendedFieldURI.PropertyType.String)); FIELD_MAP.put("im", new ExtendedFieldURI(ExtendedFieldURI.DistinguishedPropertySetType.Address, 0x8062, ExtendedFieldURI.PropertyType.String)); FIELD_MAP.put("othermobile", new ExtendedFieldURI(0x3A1E, ExtendedFieldURI.PropertyType.String)); + FIELD_MAP.put("internationalisdnnumber", new ExtendedFieldURI(0x3A2D, ExtendedFieldURI.PropertyType.String)); + + FIELD_MAP.put("otherTelephone", new ExtendedFieldURI(0x3A21, ExtendedFieldURI.PropertyType.String)); + FIELD_MAP.put("homefax", new ExtendedFieldURI(0x3A25, ExtendedFieldURI.PropertyType.String)); FIELD_MAP.put("otherstreet", new ExtendedFieldURI(0x3A63, ExtendedFieldURI.PropertyType.String)); FIELD_MAP.put("otherstate", new ExtendedFieldURI(0x3A62, ExtendedFieldURI.PropertyType.String));