![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java JavaScript 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 <C_CkEmail.h> void ChilkatSample(void) { HCkEmail email; BOOL success; int i; int numRelated; email = CkEmail_Create(); // Load an email object containing HTML with embedded images. success = CkEmail_LoadEml(email,"myEmails/HtmlEmail.eml"); if (success != TRUE) { printf("%s\n",CkEmail_lastErrorText(email)); CkEmail_Dispose(email); return; } // Iterate over the related items. // Print the file name and save each to a file. i = 0; numRelated = CkEmail_getNumRelatedItems(email); while (i < numRelated) { printf("%s\n",CkEmail_getRelatedFilename(email,i)); success = CkEmail_SaveRelatedItem(email,i,"myRelatedItemsDir"); if (success != TRUE) { printf("%s\n",CkEmail_lastErrorText(email)); CkEmail_Dispose(email); return; } i = i + 1; } CkEmail_Dispose(email); } |
||||||
© 2000-2026 Chilkat Software, Inc. All Rights Reserved.