-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getFromEmailFromHeaders cannot handle "quoted-name-with@at-sign" #43
Comments
It seems you have a better grasp of the internal Outlook model than I have. Would you be interested in providing pull requests? I would be happy to integrate any improvements you might have. |
Give me some time. Meanwhile I figured out it's not easy to construct a test .msg file for reproduction. The bug is only visible when 7d HEADERS is the last property seen. However, poi traverses the properties binary tree in a way that does not maintain the index order. So in my test message 7d HEADERS is followed by 65 SENT REPRESENTING EMAIL ADDRESS |
Attached the test file. (deleted property 65 with FlexHex, I hope it doesn't corrupt the message too much) |
Fix released in 1.7.10. Thank you for your work! |
Even though Sender Name and Email addresse are stored in the fields
0xc1f
and0x42
respectively, the parser extracts and overwrites this info from the transport headers0x7d
.If such a header contains quoted name with an @ at sign:
it wrongly calls
setFromEmail("\"bogus@domain.com\"", true)
When trying to use this e-mail with
javax.mail
it fails:Please consider reusing or copying
new javax.mail.internet.InternetHeaders(InputStream)
for splitting the headers andnew javax.mail.internet.InternetAddress(String)
for parsing the address string.The text was updated successfully, but these errors were encountered: