![]() |
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
(Go) Transition from Imap.FetchBundleAsMime to Imap.FetchSingleBdProvides instructions for replacing deprecated FetchBundleAsMime method calls with FetchSingleBd. Note: This example requires Chilkat v11.0.0 or greater.
imap := Imap_Ref.html">chilkat.NewImap() // ... // ... mset := MessageSet_Ref.html">chilkat.NewMessageSet() success := imap.QueryMbx("FROM joe@example.com",true,mset) // ... // ... // ------------------------------------------------------------------------ // The FetchBundleAsMime method is deprecated: saObj := imap.FetchBundleAsMime(mset) if imap.LastMethodSuccess() == false { fmt.Println(imap.LastErrorText()) imap.DisposeImap() mset.DisposeMessageSet() return } // ... // ... saObj.DisposeStringArray() // ------------------------------------------------------------------------ // Do the equivalent using FetchSingleBd. imap.SetAutoDownloadAttachments(true) bdMime := BinData_Ref.html">chilkat.NewBinData() bUid := mset.HasUids() numEmails := mset.Count() i := 0 for i < numEmails { success = imap.FetchSingleBd(*mset.GetId(i),bUid,bdMime) // ... // ... i = i + 1 } imap.DisposeImap() mset.DisposeMessageSet() bdMime.DisposeBinData() |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.