bbottema / outlook-message-parser

A Java parser for Outlook messages (.msg files)
76 stars 35 forks source link

Recipients appear duplicated #76

Open bbottema opened 5 months ago

bbottema commented 5 months ago

See https://github.com/bbottema/simple-java-mail/issues/504

CC duplicate recipients bug.msg causes recipients to appear duplicated in To and Cc lists.

CC duplicate recipients bug.zip

bbottema commented 3 months ago

@atmcq, I had a look at this and the issue stems from the fact we determine which address is a TO, CC and BCC, by comparing the 'display names' that we detective to belong to one of these types. Explanation: this library doesn't actually recognize addresses for specific receiver types, only the names that belong to the person. So what we do to reason back which name+addresses combinations are from which type, we compare against these names we got for these receiver types earlier instead.

The problem with this particular message (any many more messages probably) is that both TO and CC receivers share the same name part of the address. It might very well be the same person on different email address too. With the way we check receiver types I described above, both addresses exist in both TO and CC fields.

I don't know enough about Outlook on how to fix this. I have no course of action at this point and any help is welcome.