【问题标题】:Exchange Server 2007 Web Services PHP ClassExchange Server 2007 Web 服务 PHP 类
【发布时间】:2010-10-05 02:21:39
【问题描述】:

有没有人知道一个开源的 PHP 类(最好是 BSD 或 MIT 许可证),它将通过以下方式与 MS Exchange Server 2007 Web 服务交互。肥皂?

我正在寻找具有发送消息功能的更高级别的类。网络服务。

【问题讨论】:

    标签: php exchange-server exchange-server-2007 exchangewebservices


    【解决方案1】:

    我遇到了同样的问题,所以我开始在这里构建一些东西:

    https://github.com/rileydutton/Exchange-Web-Services-for-PHP

    它还没有做太多(基本上只是让您从服务器获取电子邮件列表并发送电子邮件),但它足以用作做一些更复杂事情的基本起点。

    我已经抽象出很多使用 php-ews 必须费力完成的复杂性。如果您希望使用服务器执行一些原始的、强大的命令,我会使用 php-ews...这适用于那些碰巧使用 Exchange 服务器并想要一种简单的方法来完成一些基本任务的人。

    哦,它是 MIT 许可的。

    希望有人觉得它有用!

    【讨论】:

      【解决方案2】:

      这是您需要的一个类:php-ews(该库使 Microsoft Exchange 2007 Web 服务更容易在 PHP 中实现)。 您可以在以下位置找到它:http://code.google.com/p/php-ews/

      只有一个示例,但这应该为您提供实现它的方法。 您可以在下面找到一个实现,以便:

      • 连接到服务器
      • 获取日历事件

      注意:不要忘记填写空白变量。您还需要包含 php-ews 类文件(我使用了 __autoload PHP 函数)。

      $host = '';
      $username = '';
      $password = '';
      $mail = '';
      $startDateEvent = ''; //ie: 2010-09-14T09:00:00
      $endDateEvent = ''; //ie: 2010-09-20T17:00:00
      
      $ews = new ExchangeWebServices($host, $username, $password);
      $request = new EWSType_FindItemType();
      $request->Traversal = EWSType_FolderQueryTraversalType::SHALLOW;
      
      $request->CalendarView->StartDate = $startDateEvent; 
      $request->CalendarView->EndDate = $endDateEvent; 
      $request->CalendarView->MaxEntriesReturned = 100;
      $request->CalendarView->MaxEntriesReturnedSpecified = true;
      $request->ItemShape->BaseShape = EWSType_DefaultShapeNamesType::ALL_PROPERTIES;
      
      $request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::CALENDAR;   
      $request->ParentFolderIds->DistinguishedFolderId->Mailbox->EmailAddress = $mail;
      $response = $ews->FindItem($request);
      echo '<pre>'.print_r($response, true).'</pre>';
      

      【讨论】:

        【解决方案3】:

        http://www.troywolf.com/articles/php/exchange_webdav_examples.php 下的示例适用于 Exchange 2003 而不是 2007。

        【讨论】:

          【解决方案4】:

          我一直在研究同样的问题,但尚未找到特定于 MS Exchange 的课程。但是,如果您愿意自己学习和构建 XML,您可能想看看http://rabaix.net/en/articles/2008/03/13/using-soap-php-with-ntlm-authentication 上的 NTLM SOAP 类。这将允许您针对 Active Directory 进行身份验证以进行 SOAP 调用,而本机 PHP SOAP 不允许您这样做。使用相同方法连接到 MS CRM 的另一个不错的资源是 http://www.reutone.com/heb/articles_internet.php?instance_id=62&actions=show&id=521

          【讨论】:

            【解决方案5】:

            Exchange 服务器支持 WebDAV:

            http://www.troywolf.com/articles/php/exchange_webdav_examples.php

            如果您只想发送消息,则可以使用 SMTP:

            http://ca2.php.net/manual/en/book.mail.php

            【讨论】:

            • 我有使用 NLTM 身份验证的 SMTP。但消息未保存在已发送项目中。我假设 WebDAV 会将其保存在已发送项目中,然后发送消息。
            猜你喜欢
            • 2012-12-18
            • 1970-01-01
            • 2011-05-13
            • 2012-01-14
            • 1970-01-01
            • 1970-01-01
            • 2011-04-07
            • 1970-01-01
            • 2016-11-15
            相关资源
            最近更新 更多