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.gitStep 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:
| Subsystem | Header directory | Key classes |
|---|---|---|
| CFB | cfb/ | cfb_reader, cfb_writer, cfb_document, cfb_node |
| MSG | msg/ | mapi_message, msg_reader, msg_writer, msg_document |
Step 4: Build and Verify
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildVerify 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
| Platform | Compiler | Minimum version |
|---|---|---|
| Linux | GCC | 9+ |
| Linux | Clang | 10+ |
| macOS | Apple Clang | 12+ |
| Windows | MSVC | 2019 (16.0+) |
The library builds identically on all platforms with no platform-specific code or native dependencies.