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) Parsing a Multipart/Digest EmailThis example demonstrates how to parse a multipart/digest email. An email parsed by this sample could have a MIME structure as follows: multipart/mixed text/plain text/plain multipart/digest message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 message/rfc822 text/plain
integer li_rc string ls_EmlPath oleobject loo_Email integer li_Success integer li_NumDigests integer i oleobject loo_EDigest string m // Note: This example requires Chilkat v9.5.0.66 or greater. ls_EmlPath = "qa_data/eml/multipart_digest.eml" 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 // For this example, we'll load the email from a .eml. // The email could alternatively be loaded as a result of downloading from an IMAP or POP3 server.. li_Success = loo_Email.LoadEml(ls_EmlPath) if li_Success <> 1 then Write-Debug loo_Email.LastErrorText destroy loo_Email return end if li_NumDigests = loo_Email.NumDigests Write-Debug "num digests = " + string(li_NumDigests) i = 0 do while i < li_NumDigests loo_EDigest = loo_Email.GetDigest(i) Write-Debug string(i) + ":" + loo_EDigest.FromAddress + ", " + loo_EDigest.Subject m = loo_EDigest.GetHeaderField("Message") if loo_EDigest.LastMethodSuccess = 1 then Write-Debug " Message = " + m end if destroy loo_EDigest i = i + 1 loop destroy loo_Email |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.