php-ews icon indicating copy to clipboard operation
php-ews copied to clipboard

Add Picture to Contact

Open Shaeldon opened this issue 7 years ago • 2 comments

Hello, how can I add a Picture to a new Contact?

    $api->createContacts(array(
        'GivenName' => $contact['Vorname'],
        'Surname' => $contact['Nachname'],
        'EmailAddresses' => array(
            'Entry' => array('Key' => \garethp\ews\API\Enumeration\EmailAddressKeyType::EMAIL_ADDRESS_1, '_value' => $contact['Email'])
        ),
        //Creating multiple entries
        'PhoneNumbers' => array(
            'Entry' => array(
                array('Key' => \garethp\ews\API\Enumeration\PhoneNumberKeyType::BUSINESS_PHONE, '_value' => $contact['Telefon']),
                array('Key' => \garethp\ews\API\Enumeration\PhoneNumberKeyType::MOBILE_PHONE, '_value' => $contact['Mobil']),
                array('Key' => \garethp\ews\API\Enumeration\PhoneNumberKeyType::BUSINESS_FAX, '_value' => $contact['Fax']),
            )
        ),), array(
        'SavedItemFolderId' => $folderID,
    ));`

Works perfectly, except I have no clue on how to add a picture. I found these 3 `

  • @method boolean isHasPicture()
  • @method boolean getHasPicture()
  • @method ContactItemType setHasPicture(boolean $hasPicture)`

but I'm unsure if I'm on the right track or even how to use them.

Thank you very much. Shaeldon

Shaeldon avatar Mar 21 '18 15:03 Shaeldon

There's no way yet, since it's a new feature in the latest WSDL and I haven't incorporated it yet. I'll go ahead and try to put it in in the next month or so

Garethp avatar Apr 06 '18 21:04 Garethp

Much appriciated

Shaeldon avatar Apr 16 '18 11:04 Shaeldon