2 Bugs in reading Distribution List

Hello,
I’ve added around 322 test contacts to a Contact Group in Outlook 2021.
As you can see in the snapshot, Outlook warns that adding such large (?!) number of contacts will result in lack of support by Outlook 2007 SP1 or earlier!
Of course not anyone’s case!
But when saving this contact group using Aspose, I get this string in the “TO” files:

To: “This contact group has been edited with a newer version of Outlook and
contains too many members to display.”

MyDistList = TryCast(MyMapiMessage.ToMapiMessageItem, MapiDistributionList)
When accessing MyDistList.Members/Recipients
Untitled.png (5.9 KB)

Sample project to reproduce the error added, I’ve found 2 bugs here:

WindowsApplication55.zip (3.4 MB)

Bug 1. DistList item has 2 attachments, but only 1 is attached to the output message
Bug 2. This contact group has been edited with a newer version of Outlook and
contains too many members to display.

@australian.dev.nerds

We have logged this problem in our issue tracking system as EMAILNET-40839. We will inform you once there is an update available on it. We apologize for your inconvenience.

@australian.dev.nerds,

Bug 1. DistList item has 2 attachments, but only 1 is attached to the output message

One of the attachments is OLE, you convert the message to EML, converting OLE attachments to EML isn’t supported by the API. Alternatively, save with the FileCompatibilityMode.PreserveTnefAttachments option to save OLE attachments.

var saveOpt = new EmlSaveOptions(MailMessageSaveType.EmlFormat);
saveOpt.FileCompatibilityMode = FileCompatibilityMode.PreserveTnefAttachments;
msg.Save("message.eml", saveOpt);

But anyway, it isn’t recommended to save Distribution List to EML, as members information will lost. It is better to save DL in MSG.

Bug 2. This contact group has been edited with a newer version of Outlook and
contains too many members to display.

This fixed in 22.11 version

1 Like

Hello and thanks for the 2nd bug fix.
As for the 1st one:
Sure I’d save all items from an ole2 storage (pst/ost/olm) as ole2 msg/oft.
But it’s possible that someone select eml as target!
One of the tests I always perform is to check the app behavior against all possible conditions :slight_smile:
I don’t remember if I used PreserveTnefAttachments or not, but I recall in some cases it was not possible to use it, because it was creating an empty message with just an attachment, not useful, will test and will get back :slight_smile:
Until then, if you think adding support for converting OLE attachments to EML (which isn’t supported) is not a big deal, it would be great to be added to the feature request list :slight_smile:

@australian.dev.nerds

Thanks for your thoughts, I’ve added the EMAILNET-40866 investigation ticket, but as far as I know OLE is one of the darkest things to implement. And it seems there is no way in EML to keep the OLE attachment lossless, other than wrapping it in TNEF.
Thanks.

1 Like

Hi, didn’t get this part, I thought it’s simple and they can be saved in memory stream to be added to the eml as attachment (when converting msg to eml)