Browse our Products
Aspose.Email for CPP 25.8 Release Notes
This page contains release notes information for Aspose.Email for C++ 25.8.
Aspose.Email for C++ 25.8 is based on Aspose.Email for .NET 25.7.
Aspose.Email for C++ does not support asyncronic features of e-mail protocols
New Enhancements
Extract HTML Body Resources
Aspose.Email now supports extracting externally linked image resources from the HTML body and embedding them in HTML output. This enhancement helps preserve the original appearance of messages with linked content.
New Option:
HtmlSaveOptions::set_ExtractHTMLBodyResourcesAsAttachments(bool)
When set totrue
, linked images and other resources in the HTML body are extracted and embeded.
Usage Example:
// Load the email message
auto mailMessage = MailMessage::Load(u"input.eml");
// Set options to extract external HTML resources
auto options = System::CreateObject<HtmlSaveOptions>();
options->set_ExtractHTMLBodyResourcesAsAttachments(true);
// Optional: Handle resource rendering events
auto handler = [](SharedPtr<Object> o, SharedPtr<ResourceHtmlRenderingEventArgs> args)
{
auto attachment = System::ExplicitCast<AttachmentBase>(o);
Console::WriteLine(args->get_PathToResourceFile() + " " + attachment->get_ContentId());
}
options->ResourceHtmlRendering.connect(handler);
// Save the HTML representation of the email
mailMessage->Save(u"output.html", options);
The full code of the examples can be found at Aspose Email for C++ GitHub examples repository.