简体   繁体   English

如何以编程方式从C#Web应用程序在Exchange 2007服务器上添加邮箱别名?

[英]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. 正如主题所说,我有一个与Exchange 2007服务器通信的C#Web应用程序(.NET 3.5)。 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 before sending out the mail set the new alias as the reply-to address. 我需要的帮助是以编程方式(最好是从Web应用程序本身)将新的邮箱别名添加到某个邮箱,然后在发送邮件之前,将新别名设置为回复地址。

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. 我对脚本还不是很陌生,但是到目前为止,大多数人似乎都建议使用Exchange Powershell完成此任务。 Any hints towards a third-part API that would solve this would be appreciated. 对于解决该问题的第三方API的任何提示,我们将不胜感激。 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. 我已经看过EWS API,但是到目前为止,看来还不是我要找的东西。

This is not possible with EWS API. 对于EWS API,这是不可能的。 What you need is New-Mailbox PowerShell command. 您需要的是New-Mailbox PowerShell命令。

If you have PowerShell v2 installed, you can call it remotely, read about PowerShell Remoting. 如果安装了PowerShell v2,则可以远程调用它,了解有关PowerShell Remoting的信息。

You can use "managed code" to do this. 您可以使用“托管代码”来执行此操作。 Essentially, you are programmatically communicating with Powershell. 本质上,您是通过编程方式与Powershell进行通信。

http://msdn.microsoft.com/en-us/library/bb332449%28EXCHG.80%29.aspx http://msdn.microsoft.com/zh-cn/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. 这些以及您可以通过Google找到的其他资源,应该可以帮助您编写c#代码来执行Powershell任务。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过远程Exchange 2007服务器上的Web服务为用户创建邮箱。 (C#) - Create a mailbox for an user via webservice on a remote exchange 2007 server. (C#) C# 如何从 C# 控制台应用程序以编程方式访问共享 Outlook/Exchange 邮箱以将电子邮件从收件箱移动到另一个文件夹 - C# How to access a shared outlook/exchange mailbox programmatically from a C# console application to move emails from inbox to another folder 以编程方式从Exchange Server 2010邮箱中读取电子邮件 - Programmatically reading emails from Exchange Server 2010 mailbox 如何使用Exchange Web服务从Exchange Server 2007获取所有未读邮件? - How to Get all unread mails from Exchange server 2007 using Exchange web service? 在C#中创建交换邮箱 - Create exchange mailbox in c# c#以编程方式从Exchange服务器读取电子邮件 - c# programmatically reading emails from the Exchange server 使用C#和Powershell,如何为在Exchange Server 2010上创建的邮箱设置“管理器” - Using C# and Powershell, how to set 'Manager' for mailbox created on Exchange server 2010 如何使用C#或PowerShell知道用户在Exchange上是否有邮箱 - How to know if user has a mailbox on Exchange using C# or PowerShell 如何在C#中使用LDAP从Domino服务器列出邮箱 - How to list mailbox from Domino Server using LDAP in C# 如何使用Exchange Server 2007和ASP.NET,C#设置约会 - How to set an appointment using Exchange Server 2007 and ASP.NET, C#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM