3

有誰知道開源PHP類(最好是BSD或MIT許可證),它將通過MS Exchange Server 2007 Web服務連接。肥皂?Exchange Server 2007 Web服務PHP類

我在尋找一個具有發送消息功能的更高級別的類。 Web服務。

回答

8

我有同樣的問題,所以我就開始建立的東西,在這裏:

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

它並沒有做太多,但(基本上只是讓你從一開始的電子郵件列表服務器,併發送電子郵件),但它可以作爲做一些更復雜的事情的基本起點。

我已經提取出了很多複雜的東西,你不得不通過使用php-ews來記錄它。如果你想用服務器做一些原始的,強大的命令,我會使用php-ews ...這是爲那些剛好在使用Exchange服務器並想要簡單方法來完成一些基本任務的人們。

哦,它是MIT許可的。

希望有人認爲它有用!

0

我一直在研究這個同樣的問題我還沒有找到特定於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

下面是你需要的類: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>'; 
相關問題