Classic ASP
Classic ASP
Transition from Imap.ThreadCmd to Imap.QueryThread
Provides instructions for replacing deprecated ThreadCmd method calls with QueryThread.Chilkat Classic ASP Downloads
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0
set imap = Server.CreateObject("Chilkat.Imap")
' ...
' ...
threadAlg = "REFERENCES"
charset = "UTF-8"
searchCriteria = "SUBJECT a"
bUid = 1
' ------------------------------------------------------------------------
' The ThreadCmd method is deprecated:
' jsonObj is a Chilkat.JsonObject
Set jsonObj = imap.ThreadCmd(threadAlg,charset,searchCriteria,bUid)
If (imap.LastMethodSuccess = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( imap.LastErrorText) & "</pre>"
Response.End
End If
' ...
' ...
' ------------------------------------------------------------------------
' Do the equivalent using QueryThread.
' Your application creates a new, empty JsonObject object which is passed
' in the last argument and filled upon success.
imap.SearchCharset = "UTF-8"
set json = Server.CreateObject("Chilkat.JsonObject")
success = imap.QueryThread(threadAlg,searchCriteria,bUid,json)
If (success = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( imap.LastErrorText) & "</pre>"
Response.End
End If
%>
</body>
</html>