mguessan / davmail

DavMail POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange and Office 365 Gateway - Synced with main subversion repository at
http://davmail.sourceforge.net
GNU General Public License v2.0
582 stars 86 forks source link

Bug in vcf handling (multiple types) #256

Open sds-entwicklung opened 1 year ago

sds-entwicklung commented 1 year ago

System:

Error description:

I am sending contact information with carddav (vcf) to davmail:

BEGIN:VCARD
UID:WA-ORADX00019-0-20221129094653
VERSION:3.0
PRODID:sds2Carddav
FN:Max Mustermann
N:Mustermann;Max;;;
ADR;TYPE=WORK:;;Musterweg 2;Musterort;;12345;
TEL;TYPE=VOICE;TYPE=WORK:0123456789
TEL;TYPE=VOICE;TYPE=CELL:111111111
TEL;TYPE=FAX;TYPE=WORK:55555555
EMAIL;TYPE=WORK;TYPE=INTERNET:m.mustermann@muster.de
NOTE:MUSTER GMBH
ORG:Muster Gmbh
TITLE:~WA
END:VCARD

It should create this contact at the Exchange Server. When comparing the created contact on the Exchange Server with my sent vcf, I recognized that the phone number is missing and the fax number is shown as commercial phone number instead:

O365-contact

I checked the davmail log and found this line:

davmail.exchange.ExchangeSession - Create or update contact WA-ORADX00019-0-20221129094653.vcf: {st=, smtpemail1=m.mustermann@muster.de, postofficebox=, telephoneNumber=55555555, subject=Max Mustermann, fileas=Max Mustermann, givenName=Max, roomnumber=, mobile=111111111, middlename=, description=MUSTER GMBH, cn=Max Mustermann, namesuffix=, l=Musterort, co=, title=~WA, o=Muster Gmbh, outlookmessageclass=IPM.Contact, email1=m.mustermann@muster.de, street=Musterweg 2, postalcode=12345, sn=Mustermann, personaltitle=}

So apparently it has to be a bug in davmail. It just handles the last type of each line which is work in this case. The second line with type work (fax number) overrides the first line with type work (phone number).

Can you fix this issue please? I appreciate your help.