![]() |
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
(DataFlex) Access Attached Message (Embedded Email)How to access an email embedded within another email (i.e. an attached message). Note: This example requires Chilkat v11.0.0 or greater.
Use ChilkatAx-win32.pkg Procedure Test Boolean iSuccess Handle hoEmail Integer iNumAttached Variant vEmail2 Handle hoEmail2 String sTemp1 Move False To iSuccess Get Create (RefClass(cComChilkatEmail)) To hoEmail If (Not(IsComObjectCreated(hoEmail))) Begin Send CreateComObject of hoEmail End // Load an email from a .eml Get ComLoadEml Of hoEmail "embeddedEmail.eml" To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoEmail To sTemp1 Showln sTemp1 Procedure_Return End // Display how many attached emails are embedded within // this one: Get ComNumAttachedMessages Of hoEmail To iNumAttached Showln "numAttached = " iNumAttached // Get the 1st attached message. Get Create (RefClass(cComChilkatEmail)) To hoEmail2 If (Not(IsComObjectCreated(hoEmail2))) Begin Send CreateComObject of hoEmail2 End Get pvComObject of hoEmail2 to vEmail2 Get ComGetAttachedEmail Of hoEmail 0 vEmail2 To iSuccess If (iSuccess = True) Begin // Display the subject, From, and a header field... Get ComSubject Of hoEmail2 To sTemp1 Showln sTemp1 Get ComFrom Of hoEmail2 To sTemp1 Showln sTemp1 Get ComGetHeaderField Of hoEmail2 "X-SOMETHING" To sTemp1 Showln sTemp1 End End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.