Browse our Products

Aspose.Email for .NET 24.3 Release Notes

All Changes

KeySummaryCategory
EMAILNET-40145Support for Contacts and Calendar in MS GraphFeature
EMAILNET-41303MailMessage.Load hangsEnhancement
EMAILNET-41309TimeZone is null when loading appointmentBugBug
EMAILNET-41304ArgumentNullException while opening VCF fileBug
EMAILNET-41301WeekDay can not be converted because of an unexpected value of the Day propertyBug
EMAILNET-41300BYSETPOS must only be used in conjunction with another BYxxx rule partBug
EMAILNET-41299Validation of EMLX files by MessageValidator throws the error “Given stream has incorrect format”Bug

New Features

Support for Contacts and Calendar in MS Graph

Support for Contacts and Calendar in Microsoft Graph provides developers with APIs to access, manage, and interact with users’ contacts and calendar events.

We added the following methods to IGraphClient interface:

  • ListContacts(string id) - Retrieves a collection of MAPI contacts associated with the specified folder ID.

  • FetchContact(string id) - Retrieves a specific contact based on the provided item ID.

  • CreateContact(string folderId, MapiContact contact) - Creates a new contact in the specified folder.

  • UpdateContact(MapiContact contact) - Updates an existing contact.

  • ListCalendars() - Retrieves a collection of calendar information.

  • ListCalendarItems(string id) - Retrieves a collection of calendar items associated with the specified calendar ID.

  • FetchCalendarItem(string id) - Retrieves a specific calendar item based on the provided ID.

  • CreateCalendarItem(string calId, MapiCalendar mapiCalendar) - Creates a new calendar item in the specified calendar.

  • UpdateCalendarItem(MapiCalendar mapiCalendar) - Updates an existing calendar item.

  • UpdateCalendarItem(MapiCalendar mapiCalendar, UpdateSettings updateSettings) - Updates an existing calendar item with specified update settings.

Code Examples

Manage contact items

// List Contacts
MapiContactCollection contacts = graphClient.ListContacts("contactFolderId");

// Fetch Contact
MapiContact contact = graphClient.FetchContact("contactId");

// Create Contact
MapiContact newContact = new MapiContact("Jane Smith", "jane.smith@example.com", "XYZ Corporation", "777-888-999");

MapiContact createdContact = graphClient.CreateContact("contactFolderId", newContact);

// Update Contact
createdContact.Telephones.PrimaryTelephoneNumber = "888-888-999";

MapiContact updatedContact = graphClient.UpdateContact(createdContact);

Manage Calendar Items


// List Calendars
CalendarInfoCollection calendars = graphClient.ListCalendars();

// List Calendar Items
MapiCalendarCollection calendarItems = graphClient.ListCalendarItems("calendarId");

// Fetch Calendar Item
MapiCalendar calendarItem = graphClient.FetchCalendarItem("calendarItemId");

// Create Calendar Item
MapiCalendar newCalendarItem = new MapiCalendar(
    location: "Conference Room",
    summary: "Team Meeting",
    description: "Discuss project status and updates.",
    startDate: startDate,
    endDate: endDate
);

MapiCalendar createdCalendarItem = graphClient.CreateCalendarItem("calendarId", newCalendarItem);

// Update Calendar Item
createdCalendarItem.Location = "Zoom Meeting";
MapiCalendar updatedCalendarItem = graphClient.UpdateCalendarItem(createdCalendarItem);