使用PHP访问Exchange的最佳方法? [英] Best way to access Exchange using PHP?

查看:285
本文介绍了使用PHP访问Exchange的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用PHP编写CMS应用程序,其中一项要求是它必须能够与客户的Exchange服务器对接.我之前已经写过几次此功能,并且一直使用 WebDAV 来做到这一点,但是现在我要远离它了.

I'm writing a CMS application in PHP and one of the requirements is that it must be able to interface with the customer's Exchange server. I've written up this functionality a few times before and have always used WebDAV to do it, but now I'm leaning away from that.

我将在Windows Server 2008上的IIS或Apache上运行站点(无首选项).我需要做的一些事情包括将联系人添加到给定用户的通讯录中,以给定用户的身份发送电子邮件并在用户的联系人.

I will be running the site on IIS OR Apache (no preference) on Windows server 2008. A few things I would need to do include adding contacts to a given user's address book, sending emails as a given user and running reports on contacts for a user.

使用WebDAV可以轻松实现所有这些功能,但是如果有更好的方法不需要任何可能很快被弃用的功能.

All of this is pretty easy to do with WebDAV, but if there is a better way that doesn't require any functionality that is likely to be deprecated any time soon.

有什么想法吗?

贾斯汀,我喜欢使用com对象的想法,我只是担心维护第3种产品以使一切正常工作...

Justin, I love the idea of using com objects, I just worry about maintaining a 3rd product to make everything work...

John,我可以用C#编写一个Web服务来与这些功能交互,并可以通过我的PHP应用程序访问它,但这也有点麻烦.

John, I can write a web service in C# to interface with for these functions and access it with my PHP app, but it's also a little bit out of the way.

到目前为止,我还不是100%确信这两种方法都比WebDAV更好...

So far, I'm not 100% convinced that either of these is better than WebDAV...

有人可以告诉我我在哪里傻吗?

Can anyone show me where I'm being silly?

推荐答案

我没有使用PHP来做到这一点,但是有使用C#实现同一件事的经验.

I have not used PHP to do this but have experience in using C# to achieve the same thing.

Outlook API是自动执行Outlook而不是直接连接到Exchange的一种方法.我以前在C#应用程序中采用过这种方法,尽管可能有问题,但它确实可以工作.

The Outlook API is a way of automating Outlook rather than connecting to Exchange directly. I have previously taken this approach in a C# application and it does work although can be buggy.

如果您希望直接连接到Exchange服务器,则需要研究扩展的MAPI.

If you wish to connect directly to the Exchange server you will need to research extended MAPI.

过去,我使用此包装器 MAPIEx:扩展的MAPI包装器.

In the past I used this wrapper MAPIEx: Extended MAPI Wrapper.

这是一个C#项目,但我相信您可以在PHP5 Windows服务器上使用一些.NET代码.或者,它具有您可能可以使用的C ++核心DLL.我发现它非常好,并且有一些很好的示例应用程序.

It is a C# project but I believe you can use some .NET code on a PHP5 Windows server. Alternatively it has a C++ core DLL that you may be a able to use. I have found it to be very good and there are some good example applications.

抱歉,目前尚无跟踪帖子的方法.

Sorry for the delay no current way to keep track of posts yet.

我确实同意在您的应用程序上添加更多层,并且依靠第三方代码可能会令人恐惧(理应如此).

I do agree adding more layer on to your application and relying on 3rd party code can be scary (and rightfully so.)

今天,我读了另一篇有趣的帖子,该帖子被标记为MAPI,位于另一个学科.不过,这里的关键是它已链接到

Today I read another interesting post tagged up as MAPI that is on a different subject. The key thing here though is that it has linked to this important MS article. I have been unaware of the issues until now on using managed code to interface to MAPI although the C++ code in the component should be unaffected by this error as it is unmanaged.

此博客条目还建议了其他连接到MAPI/Exchange服务器的方法.在这种情况下,由于这些新事实, http://us3.php.net/imap 可能是根据其他用户的建议进行回答.

This blog entry also suggests other ways to connect to MAPI/Exchange server. In this case due to these new facts http://us3.php.net/imap may be the answer as suggested by the other user.

这篇关于使用PHP访问Exchange的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆