Support for Extended Attributes Manipulation using Aspose.Email for Java

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

aspose-email-for-javaWe are pleased to announce the release of Aspose.Email for Java 17.11. This release introduces a new feature of working with Extended attributes of messages using API’s Exchange Web Service (EWS) client. In addition, it also brings several fixes to other functionality of the API that further stabilizes the overall behavior of the API in terms of expected behavior. For a complete list of what is new and fixed, please visit the release notes section of API documentation.

Working with Extended Attributes of Message using EWS

This version of Aspose.Email for Java provides the capability to work with Extended Attributes of messages using the API’s EWS client. Extended attributes can be added to message in the same way as adding Named properties to messages. The API now has FetchMapiMessage method that allows to retrieve a message from Exchange server along with such properties associated with it. This is as shown in the following sample code.

//Create a new Property
PidNamePropertyDescriptor pd = new PidNamePropertyDescriptor(
    "MyTestProp",
    PropertyDataType.String,
    UUID.fromString("00020329-0000-0000-C000-000000000046"));
String value = "MyTestPropValue";

//Create a message
MapiMessage message = new MapiMessage(
    "from@domain.com",
    "to@domain.com",
    "EMAILNET-38844 - " + UUID.randomUUID().toString(),
    "EMAILNET-38844 EWS: Support for create, retrieve and update Extended Attributes for Emails");

//Set property on the message
message.setProperty(pd, value);

//append the message to server
String uri = client.appendMessage(message);

//Fetch the message from server
MapiMessage mapiMessage = client.fetchMapiMessage(uri, Arrays.asList(new PropertyDescriptor[] { pd }));

//Retrieve the property from the message
String fetchedValue = mapiMessage.getNamedProperties().get_Item(pd).getString();

Other Improvements

In addition to new feature, this release of API also includes several improvements in terms of bug fixes. This further adds to the overall stability of the API in terms of expected output.

API Resources

We have detailed information available online for getting started with the Aspose.Email for Java API. These are:


To keep up with our news, you can follow us on Twitter or follow our Facebook page.

Leave a Reply