noname007/yii2-ews

a simple wrapper for php-ews

Installs: 169

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 1

Type:yii2-extension

v0.4.0 2020-05-08 08:34 UTC

This package is auto-updated.

Last update: 2024-04-30 00:45:29 UTC


README

a simple wrapper for php-ew

about service application account

ews docs: https://docs.microsoft.com/zh-cn/Exchange/client-developer/exchange-web-services/ews-application-types

install

php composer.phar require noname007/yii2-ews

config

....

   component => [
        ...
        'ews' => [
            'class' => Ews::class,
            'host' => 'exchange serve domain',
            'password' => 'service application account',
            'username' => 'service application account',
        ]
   ]

...
..

usage

$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
);