Manage Inbox Rules on Exchange Server in C#

Microsoft Exchange Server allows you to define different rules for the inbox, which are applied to the messages such as moving a message to a folder, deleting a message, etc. While working with the Exchange services from within .NET applications, you may need to manage inbox rules programmatically. In this article, you will learn how to create and update inbox rules on MS Exchange Server in C# .NET.

C# API to Create and Update Inbox Rules on Exchange Server

To create and update inbox rules on MS Exchange Server, we will use Aspose.Email for .NET. The API makes it quite easier to seamlessly work with MS Exchange Server. You can either download the API’s DLL or install it from NuGet using the following command.

PM> Install-Package Aspose.Email

Create Inbox Rules on Exchange Server in C#

Aspose.Email for .NET uses Exchange Web Services (EWS) to work with inbox rules on Exchange Server. The following are the steps to create inbox rules on Exchange Server in C#.

The following code sample shows how to create an inbox rule on Exchange Server in C#.

Update Inbox Rules on Exchange Server in C#

The following are the steps to fetch and update an existing inbox rule on Exchange Server in C#.

The following code sample shows how to update an inbox rule on MS Exchange Server in C#.

C# API to Manage Inbox Rules on Exchange Server - Get a Free License

You can get a free temporary license to manage inbox rules on MS Exchanger Server without evaluation limitations.

Conclusion

In this article, you have learned how to work with inbox rules on Microsoft Exchange Server from within .NET applications. With the help of code samples, you have seen how to add or update inbox rules on Exchange Server in C#. Besides, you can explore the documentation to read more about Aspose.Email for .NET. In addition, you can post your queries to our forum.

See Also