Installation

Install Aspose.Email FOSS for C++

Aspose.Email FOSS for C++ has no external dependencies. It requires a C++17 compiler and CMake 3.26 or later.

Step 1: Clone the Repository

git clone https://github.com/aspose-email-foss/Aspose.Email-FOSS-for-Cpp.git

Step 2: Add as CMake Subdirectory

In your project’s CMakeLists.txt:

cmake_minimum_required(VERSION 3.26)
project(my_project)

add_subdirectory(Aspose.Email-FOSS-for-Cpp)

add_executable(my_app main.cpp)
target_link_libraries(my_app PRIVATE AsposeEmailFoss::AsposeEmailFoss)

Step 3: Include Headers

#include "aspose/email/foss/msg/mapi_message.hpp"
#include "aspose/email/foss/cfb/cfb_reader.hpp"

All public headers live under include/aspose/email/foss/. The two main subsystems are:

SubsystemHeader directoryKey classes
CFBcfb/cfb_reader, cfb_writer, cfb_document, cfb_node
MSGmsg/mapi_message, msg_reader, msg_writer, msg_document

Step 4: Build and Verify

cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

Verify with a minimal program:

#include <iostream>
#include "aspose/email/foss/msg/mapi_message.hpp"

int main()
{
    auto message = aspose::email::foss::msg::mapi_message::create("Test", "Hello");
    std::cout << message.subject() << '\n';
    // Output: Test
}

Supported Platforms

PlatformCompilerMinimum version
LinuxGCC9+
LinuxClang10+
macOSApple Clang12+
WindowsMSVC2019 (16.0+)

The library builds identically on all platforms with no platform-specific code or native dependencies.

 English