Garethp / php-ews

PHP Exchange Web Services
BSD 3-Clause "New" or "Revised" License
112 stars 45 forks source link

Change "busy" status for event. #257

Closed Lxxrxns closed 8 months ago

Lxxrxns commented 8 months ago

Hi there!

Thanks for this excellent PHP library.

Is it possible to change whether an event sets a person as "busy" in Outlook?

i.e. something like:

$calendar->createCalendarItems(array(
    'Subject' => 'Test',
    'Start' => $start->format('c'),
    'End' => $end->format('c'),
    'setBusy' => false
)

Thanks for the help!

Kind regards,

Laurens

Dumdidum12 commented 8 months ago

Hi Lxxrxns,

Just use like this:

$calendar->createCalendarItems(array(
    'Subject' => 'Test',
    'Start' => $start->format('c'),
    'End' => $end->format('c'),
    'LegacyFreeBusyStatus' => 'Free'
)

Which status you can use can you find here: https://learn.microsoft.com/en-us/dotnet/api/microsoft.exchange.webservices.data.legacyfreebusystatus?view=exchange-ews-api

Lxxrxns commented 8 months ago

Thanks a lot!