Work with Conversations on MS Exchange Server in Java

Work with Conversations on MS Exchange Server in Java

Often, an email is composed of multiple messages (or replies) forming a thread. In Microsoft Exchange Server, these threads are termed as conversations. While working with MS Exchange Server programmatically, you may need to access and manage the conversations. To accomplish that, in this article, you will learn how to find, copy, move and delete conversations on Microsoft Exchange Server in Java.

Java API to Work with Conversations on MS Exchange Server

To work with the conversations on Microsoft Exchange Server, we will use Aspose.Email for Java. It is an amazing API that provides a bunch of features to work with MS Exchange Server from within Java applications. You can either download the API or install it using the following Maven configurations.

Repository:
<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>http://repository.aspose.com/repo/</url>
</repository>

Dependency:
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-email</artifactId>
    <version>22.2</version>
    <classifier>jdk16</classifier>
</dependency>

Find Conversations on MS Exchange Server in Java

The following are the steps to find conversations from a folder in MS Exchange Server using Java.

The following code sample shows how to find conversations from a folder in MS Exchange Server in Java.

Copy a Conversation on MS Exchange Server in Java

You can also copy the conversations from one folder to another. Let’s have a look at how to copy conversations from the inbox to deleted items folder of Exchange Server in Java.

The following code sample shows how to copy a conversation in MS Exchange Server using Java.

Move a Conversation on MS Exchange Server in Java

In the previous section, we just copied conversations from one folder to another. However, in certain cases, you may need to move a conversation to a particular folder. The following are the steps to move a conversation in MS Exchange Server in Java.

The following code sample shows how to move a conversation in MS Exchange Server using Java.

Delete a Conversation on MS Exchange Server in Java

In the end, let’s have a look at how to delete a conversation from MS Exchange Server in Java.

The following code sample shows how to delete a conversation from MS Exchange Server in Java.

Get a Free API License

You can get a free temporary license to use Aspose.Email for Java without evaluation limitations.

Conclusion

In this article, you have learned how to manage conversations in Microsoft Exchange Server using Java. You have seen how to find, copy, move, and delete a conversation on MS Exchange Server programmatically in Java. In addition, you can explore the documentation to read more about Aspose.Email for Java. Also, you can ask your questions via our forum.

See Also