Is there any way to determine if an email address maps to a distribution list when I’m reading the email from a PST?
Thanks,
//Christopher
Hi Christopher,
When I open an MSG file, and read the recipients list or read the Mapi properties of each recipient, is there a way to determine if any particular recipient is a distribution list. If any of the recipients are a distribution list, is there a way to determine who was in that distribution list?
Thanks,
//C
Hi Chirstopher,
We have tested this issue by sending out an email to a distribution list. However, the sent as well asreceived messages contains the individual emails of the distribution list and not a distribution list name. Thus,
we are not able to find any such way to determine if the contacts found belong to a distribution list or not. Could
you please share with us if sending an email message to a distribution list retains the list name? If possible, please
share such a sample file for our reference.
There appears to be a Mapi property for the recipient which designates the recipient as a D-List. I have attached an example. I’m curious, how do I look up and find the D-List in the PST?
Thanks,
//C
Hi Christopher,
MapiMessage mapi = MapiMessage.fromFile(“Sample.MSG”);
for(MapiRecipient recp : mapi.getRecipients())
System.out.println(recp.getRecipientClass());
I have a related question. I need to find the number of recipients for each email. I need to iterate over the to, cc and bcc lists. Also, any entry may be a distribution list and in fact distribution lists may be nested within other distribution lists.
I’m trying to determine how to do this (and efficiently). I am currently opening my local ost file and therefore not logged into my corporate exchange server. Do I need to be logged in to do this?
How can I best accomplish my overall goal?
TIA
-M
I have observed your requirements and like to share that there is no other way to then to iterate the emails and getting recipient lists.
Thanks - I have 2 follow-up questions:
- How can I determine if a recipient is an individual or distribution list?
- How can I expand a distribution list to get all of the recipients in that list?
I like to inform that you can use EWS client to check and expand Distribution Lists. Please visit this documentation link for more details.