使用 PHP-EWS 更新自动回复(外出)
Using PHP-EWS to update Automatic Replies (Out of Office)
我正在尝试使用 PHP 开发一个 Web 界面,它允许任何授权用户(特别是来自人力资源部门的用户)更新任何活动 Exchange 的自动回复(外出)user/mailbox.我已使用 php-ews (https://github.com/jamesiarmes/php-ews) 成功连接到 Exchange Web 服务 (Office 365) 并检索了用户邮箱配置。但是,我找不到任何关于自动回复(外出)的信息。是否有人可以提供有关如何实现这一目标的示例或指导?
您将需要使用 GetUserOofSettings https://msdn.microsoft.com/en-us/library/office/aa563465(v=exchg.150).aspx and SetUserOofSettings https://msdn.microsoft.com/en-us/library/office/aa580294(v=exchg.150).aspx to do that in EWS. You will also need to use Impersonation to have the specific rights to do that make those changes https://msdn.microsoft.com/en-us/library/office/dn722377(v=exchg.150).aspx。
如果您使用 Office365,您的另一个选择是您可以使用图形 API 来做同样的事情 https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_get_mailboxsettings,这可以解决 EWS 模拟可能导致的任何安全问题。
我正在尝试使用 PHP 开发一个 Web 界面,它允许任何授权用户(特别是来自人力资源部门的用户)更新任何活动 Exchange 的自动回复(外出)user/mailbox.我已使用 php-ews (https://github.com/jamesiarmes/php-ews) 成功连接到 Exchange Web 服务 (Office 365) 并检索了用户邮箱配置。但是,我找不到任何关于自动回复(外出)的信息。是否有人可以提供有关如何实现这一目标的示例或指导?
您将需要使用 GetUserOofSettings https://msdn.microsoft.com/en-us/library/office/aa563465(v=exchg.150).aspx and SetUserOofSettings https://msdn.microsoft.com/en-us/library/office/aa580294(v=exchg.150).aspx to do that in EWS. You will also need to use Impersonation to have the specific rights to do that make those changes https://msdn.microsoft.com/en-us/library/office/dn722377(v=exchg.150).aspx。
如果您使用 Office365,您的另一个选择是您可以使用图形 API 来做同样的事情 https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_get_mailboxsettings,这可以解决 EWS 模拟可能导致的任何安全问题。