![]() |
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
(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 Note: This example requires Chilkat v11.0.0 or greater.
integer li_rc integer li_Success string ls_EmlPath oleobject loo_Email integer li_NumDigests oleobject loo_EDigest integer i string m li_Success = 0 ls_EmlPath = "qa_data/eml/multipart_digest.eml" loo_Email = create oleobject 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 = 0 then Write-Debug loo_Email.LastErrorText destroy loo_Email return end if li_NumDigests = loo_Email.NumDigests Write-Debug "num digests = " + string(li_NumDigests) loo_EDigest = create oleobject li_rc = loo_EDigest.ConnectToNewObject("Chilkat.Email") i = 0 do while i < li_NumDigests loo_Email.GetDigestEmail(i,loo_EDigest) 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 i = i + 1 loop destroy loo_Email destroy loo_EDigest |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.