Lianja
Lianja
Transition from Imap.ThreadCmd to Imap.QueryThread
Provides instructions for replacing deprecated ThreadCmd method calls with QueryThread.Chilkat Lianja Downloads
llSuccess = .F.
loImap = createobject("CkImap")
// ...
// ...
lcThreadAlg = "REFERENCES"
lcCharset = "UTF-8"
lcSearchCriteria = "SUBJECT a"
llBUid = .T.
// ------------------------------------------------------------------------
// The ThreadCmd method is deprecated:
loJsonObj = loImap.ThreadCmd(lcThreadAlg,lcCharset,lcSearchCriteria,llBUid)
if (loImap.LastMethodSuccess = .F.) then
? loImap.LastErrorText
release loImap
return
endif
// ...
// ...
release loJsonObj
// ------------------------------------------------------------------------
// Do the equivalent using QueryThread.
// Your application creates a new, empty JsonObject object which is passed
// in the last argument and filled upon success.
loImap.SearchCharset = "UTF-8"
loJson = createobject("CkJsonObject")
llSuccess = loImap.QueryThread(lcThreadAlg,lcSearchCriteria,llBUid,loJson)
if (llSuccess = .F.) then
? loImap.LastErrorText
release loImap
release loJson
return
endif
release loImap
release loJson