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
(PowerBuilder) Iterate Email HeadersDemonstrates how to iterate over the email header fields.
integer li_rc oleobject loo_Email integer li_Success integer n integer i string ls_Name string ls_Value loo_Email = create oleobject // Use "Chilkat_9_5_0.Email" for versions of Chilkat < 10.0.0 li_rc = loo_Email.ConnectToNewObject("Chilkat.Email") if li_rc < 0 then destroy loo_Email MessageBox("Error","Connecting to COM object failed") return end if // First, load an email from a file. // Note: an email object may be loaded from a file, or // downloaded directly from a POP3 or IMAP server... li_Success = loo_Email.LoadEml("testReceivedHdrs.eml") if li_Success <> 1 then Write-Debug loo_Email.LastErrorText destroy loo_Email return end if // How many header fields? n = loo_Email.NumHeaderFields if n > 0 then // Display the name and value of each header: for i = 0 to n - 1 ls_Name = loo_Email.GetHeaderFieldName(i) ls_Value = loo_Email.GetHeaderFieldValue(i) Write-Debug string(i) Write-Debug ls_Name Write-Debug ls_Value next end if destroy loo_Email |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.