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) POP3 Fetch Mime Source of Email by UIDLDemonstrates how to fetch the MIME source of a single email by UIDL.
integer li_rc oleobject loo_Mailman oleobject loo_Sa integer li_NumUidls oleobject loo_BdMime string ls_Uidl integer li_Success // This example requires the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. loo_Mailman = create oleobject // Use "Chilkat_9_5_0.MailMan" for versions of Chilkat < 10.0.0 li_rc = loo_Mailman.ConnectToNewObject("Chilkat.MailMan") if li_rc < 0 then destroy loo_Mailman MessageBox("Error","Connecting to COM object failed") return end if loo_Mailman.MailHost = "pop.example.com" loo_Mailman.PopUsername = "myLogin" loo_Mailman.PopPassword = "myPassword" loo_Mailman.MailPort = 995 loo_Mailman.PopSsl = 1 loo_Sa = loo_Mailman.GetUidls() if loo_Mailman.LastMethodSuccess = 0 then Write-Debug loo_Mailman.LastErrorText destroy loo_Mailman return end if li_NumUidls = loo_Sa.Count loo_BdMime = create oleobject // Use "Chilkat_9_5_0.BinData" for versions of Chilkat < 10.0.0 li_rc = loo_BdMime.ConnectToNewObject("Chilkat.BinData") // Download the 1st email and save to a file. if li_NumUidls > 0 then ls_Uidl = loo_Sa.GetString(0) Write-Debug ls_Uidl // Download the MIME source of the email into bdMime. // The bdMime contains the email exactly as it is on the mail server. li_Success = loo_Mailman.FetchMimeBd(ls_Uidl,loo_BdMime) if li_Success = 0 then Write-Debug loo_Mailman.LastErrorText destroy loo_Mailman destroy loo_BdMime return end if li_Success = loo_BdMime.WriteFile("qa_output/firstEmail.eml") end if destroy loo_Sa destroy loo_Mailman destroy loo_BdMime |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.