![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(C++) Save HTML Email Embedded ImagesSaves HTML embedded items to files in a subdirectory. Images, style sheets, and anything else embedded within HTML, are not considered to be attachments. Instead, these items are "related item". The Chilkat email object provides a set of methods/properties for accessing the related items within an email.
#include <CkEmail.h> void ChilkatSample(void) { CkEmail email; // Load an email object containing HTML with embedded images. bool success = email.LoadEml("myEmails/HtmlEmail.eml"); if (success != true) { std::cout << email.lastErrorText() << "\r\n"; return; } // Iterate over the related items. // Print the file name and save each to a file. int i = 0; int numRelated = email.get_NumRelatedItems(); while (i < numRelated) { std::cout << email.getRelatedFilename(i) << "\r\n"; success = email.SaveRelatedItem(i,"myRelatedItemsDir"); if (success != true) { std::cout << email.lastErrorText() << "\r\n"; return; } i = i + 1; } } |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.