Get addressbook contact picture


how can i get the contact picture in the addressbook of some contacts?

My Code:

// Open addressbok
if (!$abEntry = mapi_msgstore_openentry($publicStore, hex2bin(FOLDER_ENTRYID))) {
	errExit('Cannot open addressbook by ENTRYID!');

// Query entryid:
$message = mapi_msgstore_openentry($publicStore, $contactEntryID);
if (!$message) {
	errExit("Cannot get entryid");

// Get attachments
$attachmentTable = mapi_message_getattachmenttable($message);
$attachmentData = mapi_table_queryallrows($attachmentTable);

I can read all attachments of a contact, but how to know, which attachment ist the contact picture?

Please help me!

Hi @dbgtmaster ,

briefly talked to a developer about this and the attachment in questions contains the property PR_ATTACHMENT_CONTACTPHOTO


I’m curious. what are you developing? We have some external plugins and project listed at, maybe you want to add your project later as well.


thanks for your response, i try it.
I develop a script for my asterisk, which query the incoming call number to a public addressbook and displays the name and photo, if availble.

Log in to reply

Looks like your connection to Kopano Community Forum was lost, please wait while we try to reconnect.