a simple wrapper for php-ew
php composer.phar require noname007/yii2-ews
....
component => [
...
'ews' => [
'class' => Ews::class,
'host' => 'exchange serve domain',
'password' => 'service application account',
'username' => 'service application account',
]
]
...
..
$ews = Yii::$app->ews;
$ews->impersonateByPrimarySmtpAddress('impersonated people email');
$guests =[
new Guests(
array('name' => 'John', 'email' => 'noname007@githubc.com',)
),
];
$ews->createAppointment(new DateTime("@".(time() + 15 * 60)),
new DateTime('@'.(time() + 30 * 60)),
'subject text',
$guests
);