Not all Recipients displayed in Outlook
Closed this issue · 2 comments
acepe commented
Hi,
I have attached a test-case that creates a message, adds 40 recipients, saves the file to disk and successfully reads back the file including all 40 recipients. So far so good :)
However, when i open the saved file with Outlook, only 28 recipients are displayed.
It seems not to be a general Outlook-problem, because i can create an email with more than 28 recipients manually and save/load that file and all recipients are still there.
So i suspect the file created by jotlmsg is not valid...
@Test
public void addManyRecipients() throws Exception {
String testFilename = "test.msg";
int count = 40;
OutlookMessage message = new OutlookMessage();
IntStream.range(0,count).forEach(i -> message.addRecipient(Type.TO, "user" + i + "@xyz.com"));
message.setSubject("betreff");
message.setPlainTextBody("content");
File file = new File(testFilename);
message.writeTo(file);
InputStream msg = new FileInputStream(file);
OutlookMessage inMessage = new OutlookMessage(msg);
assertEquals("betreff", inMessage.getSubject());
assertEquals("content", inMessage.getPlainTextBody());
assertEquals(count, inMessage.getRecipients(Type.TO).size());
assertEquals(count, inMessage.getAllRecipients().size());
}
ctabin commented
Hello,
Thanks for the report and the unit test.
I reproduced the problem, I'll look forward for a solution.