We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

MapiContact.Photo.Data contains no bytes

Please run the following code using a contact that has a photo set. Note that the Data property is an empty byte array instead of containing the bytes of the photo.

using Aspose.Email;
using Aspose.Email.Clients.Exchange.WebService;
using System.Linq;

namespace ConsoleApp2
internal static class MainEntryPoint
private static readonly string _exchangeMailboxUri = “”; // <-- put your own URI here.
private static readonly string _firstMailboxAccountName = “”; // <-- put your own account name here.
private static readonly string _firstMailboxPassword = “”; // <-- put your own password here.
private static readonly string _secondMailboxSmtpEmailAddress = “”; // <-- put your own email address here.

    internal static void Main(string[] args)
        var lic = new License();
        var creds = new System.Net.NetworkCredential(_firstMailboxAccountName, _firstMailboxPassword);

        using (IEWSClient client = EWSClient.GetEWSClient(_exchangeMailboxUri, creds))
            var otherMB = client.GetMailboxInfo(_secondMailboxSmtpEmailAddress);
            var contactInfo = client.ListMessages(otherMB.ContactsUri).First();
            var mapiContact = client.FetchContact(contactInfo.UniqueUri);
            byte[] photoData = mapiContact.Photo.Data; // zero bytes (should have bytes of attached photo file).



We were able to reproduce the issue at our end and have logged it as EMAILNET-39036 for further investigation. We’ll update you here once there is some information or a fix version available in this regard.

The issues you have found earlier (filed as EMAILNET-39036) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by kashif.iqbal