התחלה
התחלה עם Aspose.Email FOSS עבור C++
ברוכים הבאים ל-Aspose.Email FOSS for C++, ספרייה חינמית ב‑C++ ברישיון MIT לקריאה, יצירה וכתיבה של קבצי Outlook MSG ומכולות Compound File Binary (CFB) containers. מדריך זה מוביל אותך מפרויקט C++ חדש לעבודה עם קבצי MSG בתוך דקות.
דרישות מקדימות
| דרישה | פרט |
|---|---|
| מהדר | C++17 or later (GCC 9+, Clang 10+, MSVC 2019+) |
| מערכת בנייה | CMake 3.26 or later |
| מערכת הפעלה | Windows, macOS, או Linux |
| תלויות | אין |
התקנה
שכפל את המאגר והוסף אותו כתת‑ספרייה של CMake:
git clone https://github.com/aspose-email-foss/Aspose.Email-FOSS-for-Cpp.gitבCMakeLists.txt שלך:
add_subdirectory(Aspose.Email-FOSS-for-Cpp)
target_link_libraries(your_target PRIVATE AsposeEmailFoss::AsposeEmailFoss)אמת עם תוכנית מינימלית:
#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
}ראה את מדריך ההתקנה להגדרת פרויקט מפורטת.
מה אתה יכול לעשות
לאחר ההגדרה תוכל מיד:
- קרא קבצי MSG עם
mapi_message::from_stream()אוmapi_message::from_file()— גישה לנושא, גוף, שולח, נמענים וקבצים מצורפים - צור הודעות MSG מאפס עם
mapi_message::create()— הגדר את כל השדות, הוסף נמענים וקבצים מצורפים, ואז סדר עםsave() - המר בין MSG ל‑EML עם
load_from_eml()ו‑save_to_eml() - בדוק מכולות בינריות CFB עם
cfb_reader— נווט אחסונים וזרמים, פתר נתיבים, קרא בתים גולמיים - כתוב מסמכי CFB עם
cfb_writerלבדיקה פורנסית או לבניית פורמט
התחלה מהירה
קרא קובץ MSG והדפס את הנושא שלו:
#include <fstream>
#include <iostream>
#include "aspose/email/foss/msg/mapi_message.hpp"
int main()
{
std::ifstream input("sample.msg", std::ios::binary);
auto message = aspose::email::foss::msg::mapi_message::from_stream(input);
std::cout << message.subject() << '\n';
}הצעדים הבאים
- Installation Guide: פרטי הגדרת CMake ובנייה
- License: תנאי רישיון MIT
- Developer Guide: פעולות MSG, מאפייני MAPI, ומבנה CFB
- Features: הפנייה המלאה לתכונות עם דוגמאות C++