Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... 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).
Use ChilkatAx-win32.pkg Procedure Test Handle hoEmail Boolean iSuccess Integer iNumAttached Variant vEmail2 Handle hoEmail2 String sTemp1 Boolean bTemp1 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 <> True) 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 ComGetAttachedMessage Of hoEmail 0 To vEmail2 If (IsComObject(vEmail2)) Begin Get Create (RefClass(cComChilkatEmail)) To hoEmail2 Set pvComObject Of hoEmail2 To vEmail2 End Get ComLastMethodSuccess Of hoEmail To bTemp1 If (bTemp1 = 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-2024 Chilkat Software, Inc. All Rights Reserved.