Email1OriginalEntryId

Hello there,

Does anybody have an example of pulling the Email1OriginalEntryId ? I think I need to use the KnownPropertyList. Can this be accessed through EWS or does it have to be through weddav?

thanks!
-Matt

@mumell,

I have observed your requirements and request you to please provide the details of requirements in the form of source file, used sample code and required input. We will be able to investigate the issue further on our end on provision of requested information.

@mudassir.fayyaz thanks for the reply. sure I am working with this simple code snippet:

        // Create instance of IEWSClient class by giving credentials
        IEWSClient client = EWSClient.GetEWSClient("https://ews.ews.com/ews/exchange.asmx", "USERNAME", "PASSWORD", "DOMAIN");

        // List all the contacts
        
        Contact[] contacts = client.GetContacts(client.MailboxInfo.ContactsUri);
        foreach (Aspose.Email.Mapi.MapiContact contact in contacts)
        {
            // Display name and email address
            textBox1.Text = contact.GetPropertyString(KnownPropertyList.Email1OriginalEntryId.LongId).ToString();

            textBox1.Text = "Name: " + contact.NameInfo.DisplayName + ", Email Address: " + contact.ElectronicAddresses.Email1.DisplayName + ": " + contact.ElectronicAddresses.Email1.OriginalDisplayName; 

        }

@mumell,

I have observed your comments. Can you please share requirements in form of sample and and required input so that we may further investigate to help you out.

Hello @Adnan.Ahmad
My only requirement is to loop through a users contacts collection and pull out the display name and the Email1OriginalEntryId. Please let me know if you need more info to answer my question
thank you

@mumell,

I have observed the requirements shared by you and have created an investigation ticket with ID EMAILNET-39285 in our issue tracking system to investigate whether it is possible to meet the illustrated requirements. I will share the feedback with you in this regard as soon as possible.

@Adnan.Ahmad thank you for the update!

@Adnan.Ahmad just checking in to see if there was any update? If you could provide a simple example of how to use KnownPropertyList that might help
thanks

@mumell,

Please try using following sample code on your end.

// List all the contacts
string[] itemUriList = client.ListItems(client.MailboxInfo.ContactsUri);

foreach (string itemUri in itemUriList)
{
    MapiMessage msg = client.FetchItem(itemUri);

    foreach (MapiNamedProperty namedProperty in msg.NamedProperties.Values)
    {
        if (namedProperty.Descriptor == KnownPropertyList.Email1OriginalEntryId)
        {
            string entryId = Convert.ToBase64String(namedProperty.Data);
        }

        if (namedProperty.Descriptor == KnownPropertyList.Email1OriginalDisplayName)
        {
            string displayName = namedProperty.GetString();
        }
    }
}

Thank you very much. this works!

@mumell,

It’s good to hear that suggested solution worked on your end. Please feel free to share if there is any further we may help you.