Classic ASP
Classic ASP
Transition from Imap.GetSslServerCert to Imap.GetServerCert
Provides instructions for replacing deprecated GetSslServerCert method calls with GetServerCert.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")
' ...
' ...
' ------------------------------------------------------------------------
' The GetSslServerCert method is deprecated:
' certObj is a Chilkat.Cert
Set certObj = imap.GetSslServerCert()
If (imap.LastMethodSuccess = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( imap.LastErrorText) & "</pre>"
Response.End
End If
' ...
' ...
' ------------------------------------------------------------------------
' Do the equivalent using GetServerCert.
' Your application creates a new, empty Cert object which is passed
' in the last argument and filled upon success.
set cert = Server.CreateObject("Chilkat.Cert")
success = imap.GetServerCert(cert)
If (success = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( imap.LastErrorText) & "</pre>"
Response.End
End If
%>
</body>
</html>