We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Repeated in 8.8.3. outlookMsgToEmail() duplicates To and Cc addresses, seemingly depending on the "name" used for the recipient addresses matching.
Pass:
To Andrew McQuillen [email protected] Cc [email protected] [email protected]
[Recipient{name='Andrew McQuillen', address='[email protected]', type=To}, Recipient{name='[email protected]', address='[email protected]', type=Cc}]
Fail:
To Andrew McQuillen [email protected] Cc Andrew McQuillen [email protected]
[Recipient{name='Andrew McQuillen', address='[email protected]', type=To}, Recipient{name='Andrew McQuillen', address='[email protected]', type=To}, Recipient{name='Andrew McQuillen', address='[email protected]', type=Cc}, Recipient{name='Andrew McQuillen', address='[email protected]', type=Cc}]
Code to repeat using attached examples:
@Test void givenMsgFile_avoidDuplicateCc() { try { Email t_message = EmailConverter.outlookMsgToEmail(new File("TestingCC.msg")); assertTrue(countCcRecipients(t_message.getRecipients()) == 1); String t_eml = EmailConverter.emailToEML(t_message); Email t_message2 = EmailConverter.emlToEmail(new ByteArrayInputStream(t_eml.getBytes())); assertTrue(countCcRecipients(t_message2.getRecipients()) == 1); } catch (Exception e) { e.printStackTrace(); } } @Test void givenMsgFileSameName_avoidDuplicateCc() { try { Email t_message = EmailConverter.outlookMsgToEmail(new File("TestingCCSameName.msg")); assertTrue(countCcRecipients(t_message.getRecipients()) == 1); String t_eml = EmailConverter.emailToEML(t_message); Email t_message2 = EmailConverter.emlToEmail(new ByteArrayInputStream(t_eml.getBytes())); assertTrue(countCcRecipients(t_message2.getRecipients()) == 1); } catch (Exception e) { e.printStackTrace(); } } public static int countCcRecipients(List<Recipient> recipients) { int ccCount = 0; for (Recipient recipient : recipients) { if ("Cc".equals(recipient.getType().toString())) { ccCount++; } } return ccCount; }
TestingMsg.zip
The text was updated successfully, but these errors were encountered:
Ok, I checked and this is actually a bug in outlook-message-parser. I added an issue there: bbottema/outlook-message-parser#76.
Sorry, something went wrong.
No branches or pull requests
Repeated in 8.8.3. outlookMsgToEmail() duplicates To and Cc addresses, seemingly depending on the "name" used for the recipient addresses matching.
Pass:
To Andrew McQuillen [email protected]
Cc [email protected] [email protected]
[Recipient{name='Andrew McQuillen', address='[email protected]', type=To}, Recipient{name='[email protected]', address='[email protected]', type=Cc}]
Fail:
To Andrew McQuillen [email protected]
Cc Andrew McQuillen [email protected]
[Recipient{name='Andrew McQuillen', address='[email protected]', type=To}, Recipient{name='Andrew McQuillen', address='[email protected]', type=To}, Recipient{name='Andrew McQuillen', address='[email protected]', type=Cc}, Recipient{name='Andrew McQuillen', address='[email protected]', type=Cc}]
Code to repeat using attached examples:
TestingMsg.zip
The text was updated successfully, but these errors were encountered: