Browse our Products

Aspose.Email for CPP 24.7 Release Notes

Aspose.Email for C++ 24.7 is based on Aspose.Email for .NET 24.6.

Aspose.Email for C++ does not support asyncronic features of e-mail protocols

New Features

Support for Task Management in Microsoft Graph

Support for Task Management in Microsoft Graph provides developers with APIs to access, manage, and interact with users’ tasks and task lists.

We added the following methods to the IGraphClient interface:

  • ListTaskLists() - Retrieves a collection of task list information.
  • GetTaskList(String id) - Retrieves a specific task list based on the provided ID.
  • DeleteTaskList(String id) - Deletes the specified task list.
  • ListTasks(String id) - Retrieves a collection of tasks associated with the specified task list ID.
  • FetchTask(String id) - Retrieves a specific task based on the provided ID.
  • CreateTask(SharedPtr task, String taskListUri) - Creates a new task in the specified task list.
  • UpdateTask(SharedPtr task) - Updates an existing task with the provided information.
  • UpdateTask(SharedPtr task, SharedPtr updateSettings) - Updates an existing task with specified update settings.

Code Examples

Manage Task Lists

// List Task Lists
auto taskLists = graphClient->ListTaskLists();

for (auto&& tList : System::IterateOver(taskLists))
{
    Console::WriteLine(String::Format(u"Task List: {0}", tList->get_DisplayName()));
}

// Get Task List
auto taskList = graphClient->GetTaskList(u"taskListId");

// Delete Task List
graphClient->DeleteTaskList(u"taskListId");

Manage Tasks

// List Tasks in a Task List
SharedPtr<MapiTaskCollection> tasks = graphClient->ListTasks(u"taskListId");

// Fetch Task
SharedPtr<MapiTask> task = graphClient->FetchTask(u"taskId");

// Create Task
auto newTask = CreateObject<MapiTask>();
newTask->set_Subject(u"New Task");
newTask->set_DueDate(CreateObject<DateTime>(2023, 12, 31));
newTask->set_Status(MapiTaskStatus::NotStarted);

SharedPtr<MapiTask> createdTask = graphClient->CreateTask(newTask, "taskListUri");

// Update Task
createdTask->set_Subject(u"Updated Task Subject");
SharedPtr<MapiTask> updatedTask = graphClient->UpdateTask(createdTask);

// Update Task with UpdateSettings
auto updateSettings = CreateObject<UpdateSettings>();
updateSettings->set_SkipAttachments(true);

SharedPtr<MapiTask> updatedTaskWithSettings = graphClient->UpdateTask(createdTask, updateSettings);

The full code of the examples can be found at Aspose Email for C++ GitHub examples repository.