![]() |
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
(PureBasic) 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.
IncludeFile "CkEmail.pb" Procedure ChilkatExample() success.i = 0 email.i = CkEmail::ckCreate() If email.i = 0 Debug "Failed to create object." ProcedureReturn EndIf ; Load an email from a .eml success = CkEmail::ckLoadEml(email,"embeddedEmail.eml") If success = 0 Debug CkEmail::ckLastErrorText(email) CkEmail::ckDispose(email) ProcedureReturn EndIf ; Display how many attached emails are embedded within ; this one: numAttached.i = CkEmail::ckNumAttachedMessages(email) Debug "numAttached = " + Str(numAttached) ; Get the 1st attached message. email2.i = CkEmail::ckCreate() If email2.i = 0 Debug "Failed to create object." ProcedureReturn EndIf success = CkEmail::ckGetAttachedEmail(email,0,email2) If success = 1 ; Display the subject, From, and a header field... Debug CkEmail::ckSubject(email2) Debug CkEmail::ckFrom(email2) Debug CkEmail::ckGetHeaderField(email2,"X-SOMETHING") EndIf CkEmail::ckDispose(email) CkEmail::ckDispose(email2) ProcedureReturn EndProcedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.