开发者

How to programmatically add mailbox alias on an Exchange 2007 server from C# web app?

As the subject says, I have a C# web application (.NET 3.5) that's communicating with an Exchange 2007 server. What I need help with is to programmatically (preferably from the web app itself) add a new mailbox alias to a certain mailbox and then bef开发者_Go百科ore sending out the mail set the new alias as the reply-to address.

I'm fairly new to scripting, but from what I've read so far, most people seem to be suggesting the Exchange Powershell to accomplish this. Any hints towards a third-part API that would solve this would be appreciated. I've looked at the EWS API but from what I've seen so far it doesn't look like that's what I'm looking for.


This is not possible with EWS API. What you need is New-Mailbox PowerShell command.

If you have PowerShell v2 installed, you can call it remotely, read about PowerShell Remoting.


You can use "managed code" to do this. Essentially, you are programmatically communicating with Powershell.

http://msdn.microsoft.com/en-us/library/bb332449%28EXCHG.80%29.aspx

This, and other sources which you can find via Google, should help you write c# code to perform Powershell tasks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜