Visual Basic 6.0
Visual Basic 6.0
Transition from MailMan.GetSmtpSslServerCert to MailMan.GetServerCert
Provides instructions for replacing deprecated GetSmtpSslServerCert method calls with GetServerCert.Chilkat Visual Basic 6.0 Downloads
Dim success As Long
success = 0
Dim mailman As New ChilkatMailMan
' ...
' ...
' ------------------------------------------------------------------------
' The GetSmtpSslServerCert method is deprecated:
Dim certObj As ChilkatCert
Set certObj = mailman.GetSmtpSslServerCert()
If (mailman.LastMethodSuccess = 0) Then
Debug.Print mailman.LastErrorText
Exit Sub
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..
Dim useSmtp As Long
useSmtp = 1
Dim certOut As New ChilkatCert
success = mailman.GetServerCert(useSmtp,certOut)
If (success = 0) Then
Debug.Print mailman.LastErrorText
Exit Sub
End If