Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Attendees not updated #55

Closed
chandrakantborse87 opened this issue Jul 27, 2016 · 4 comments
Closed

Event Attendees not updated #55

chandrakantborse87 opened this issue Jul 27, 2016 · 4 comments

Comments

@chandrakantborse87
Copy link

chandrakantborse87 commented Jul 27, 2016

Trying to update event
getting

Error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object has no 'Attendee' property in

Code:

$updateItems = $calendar->updateCalendarItem($itemId, array(
            'Subject' => 'Update Event',
            'Start' => (new \DateTime('8:00 PM'))->format('c'),
            'End' => (new \DateTime('8:30 PM'))->format('c'),
            'Location' => "Test",   
            'RequiredAttendees' => $RECIPIENTSTR_ARR    
));

Note: if we are updating Subject, start, End , Location. then it is updation properly .

but when trying to updated "Attendees" then its giving an error.

Please help me to fix this issue.
Thanks

@Garethp
Copy link
Owner

Garethp commented Jul 27, 2016

What does $RECIPIENTSTR_ARR look like?

@Garethp
Copy link
Owner

Garethp commented Sep 29, 2016

Hi @chandrakantborse87 Is this issue still plaguing you?

@Garethp Garethp closed this as completed Oct 17, 2016
@c4ncel
Copy link

c4ncel commented Oct 28, 2016

I'm seeing a similar issue.

I can create a meeting with required attendees

        $requiredAttendees = array();
        foreach($users as $user) { 
            $requiredAttendees[] = array('Mailbox' => array('EmailAddress' => $user));
        }
        $request['RequiredAttendees'] = $requiredAttendees;

.
.
$createdItemIds = $calendar->createCalendarItems($request, array('SendMeetingInvitations' => $invites));

But passing an array like this with an altered list to updateCalendarItem fails with the

Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object has no 'Attendee' property in /srv/www/htdocs/exchange/vendor/garethp/php-ews/src/API/NTLMSoapClient.php:122

But if I change the array structure to this,

$requiredAttendees[] = array('Attendee' => array('Mailbox' => array('EmailAddress' => $email)));

the update call generates no error, but the attendees are not updated.

Using this altered array structure, with Attendee defined in the create call fails with

Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object has no 'Mailbox' property in /srv/www/htdocs/exchange/vendor/garethp/php-ews/src/API/NTLMSoapClient.php:122

@ghost
Copy link

ghost commented Feb 2, 2017

You are not handling a correct structure. Check the changes in the code below.

$attendees = array();
foreach($users as $user) { 
   $attendees [] = array('mailbox' => array('emailAddress' => $user));
}
$request['RequiredAttendees'] = $attendees ;
$invites = 'SendToAllAndSaveCopy';

regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants