Classic ASP
Classic ASP
Transition from MailMan.GetSmtpSslServerCert to MailMan.GetServerCert
Provides instructions for replacing deprecated GetSmtpSslServerCert 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 mailman = Server.CreateObject("Chilkat.MailMan")
' ...
' ...
' ------------------------------------------------------------------------
' The GetSmtpSslServerCert method is deprecated:
' certObj is a Chilkat.Cert
Set certObj = mailman.GetSmtpSslServerCert()
If (mailman.LastMethodSuccess = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( mailman.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.
' We want the SMTP email server certificate..
useSmtp = 1
set certOut = Server.CreateObject("Chilkat.Cert")
success = mailman.GetServerCert(useSmtp,certOut)
If (success = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( mailman.LastErrorText) & "</pre>"
Response.End
End If
%>
</body>
</html>