php-ews
php-ews copied to clipboard
Always getting invalid server version with AWS Workmail
Version (e.g. 1.0, dev-master): 0.9.6 PHP version: 7.2 Microsoft Exchange version: AWS Workmail (Supports 2013, 2010)
Description of problem: No matter what i enter as the version, or as it's optional if i omit the version completely i always get the following error message:
Fatal error: Uncaught SoapFault exception: [a:ErrorInvalidServerVersion] The specified server version is invalid. in /mnt/hgfs/www/code/vendor/garethp/php-ews/src/API/NTLMSoapClient.php on line 118
Example request:
$api = API::withUsernameAndPassword("ews.mail.eu-west-1.awsapps.com", "xxx", "yyy");
$start = new DateTime('8:00 AM');
$end = new DateTime('9:00 AM');
$request = array(
'Items' => array(
'CalendarItem' => array(
'Start' => $start->format('c'),
'End' => $end->format('c'),
'Body' => array(
'BodyType' => BodyTypeType::HTML,
'_value' => 'This is <b>the</b> body'
),
'ItemClass' => ItemClassType::APPOINTMENT,
'Sensitivity' => SensitivityChoicesType::NORMAL,
'Categories' => array('Testing', 'php-ews'),
'Importance' => ImportanceChoicesType::NORMAL
)
),
'SendMeetingInvitations' => CalendarItemCreateOrDeleteOperationType::SEND_TO_NONE
);
$request = Type::buildFromArray($request);
$response = $api->getClient()->CreateItem($request);