Delphi DLL Requires Chilkat v11.0.0+
Delphi DLL
Transition from Imap.FetchSequenceAsMime to Imap.FetchSingleBd
Provides instructions for replacing deprecated FetchSequenceAsMime method calls with FetchSingleBd.Chilkat Delphi DLL Downloads
var
success: Boolean;
imap: HCkImap;
startSeqNum: Integer;
count: Integer;
sa: HCkStringArray;
bdMime: HCkBinData;
bUid: Boolean;
i: Integer;
begin
success := False;
imap := CkImap_Create();
// ...
// ...
startSeqNum := 1;
count := 5;
// ------------------------------------------------------------------------
// The FetchSequenceAsMime method is deprecated:
sa := CkImap_FetchSequenceAsMime(imap,startSeqNum,count);
if (CkImap_getLastMethodSuccess(imap) = False) then
begin
Memo1.Lines.Add(CkImap__lastErrorText(imap));
Exit;
end;
// ...
// ...
CkStringArray_Dispose(sa);
// ------------------------------------------------------------------------
// Do the equivalent using FetchSingleBd.
CkImap_putAutoDownloadAttachments(imap,True);
success := False;
bdMime := CkBinData_Create();
bUid := False;
i := 0;
while i < count do
begin
success := CkImap_FetchSingleBd(imap,startSeqNum + i,bUid,bdMime);
// ...
// ...
i := i + 1;
end;
CkImap_Dispose(imap);
CkBinData_Dispose(bdMime);