Sample code for 30+ languages & platforms
VB.NET Requires Chilkat v11.0.0+

Transition from MailMan.GetSmtpSslServerCert to MailMan.GetServerCert

Provides instructions for replacing deprecated GetSmtpSslServerCert method calls with GetServerCert.

Chilkat VB.NET Downloads

VB.NET
Dim success As Boolean = False

Dim mailman As New Chilkat.MailMan

'  ...
'  ...

'  ------------------------------------------------------------------------
'  The GetSmtpSslServerCert method is deprecated:

Dim certObj As Chilkat.Cert = mailman.GetSmtpSslServerCert()
If (mailman.LastMethodSuccess = False) Then
    Debug.WriteLine(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 Boolean = True

Dim certOut As New Chilkat.Cert
success = mailman.GetServerCert(useSmtp,certOut)
If (success = False) Then
    Debug.WriteLine(mailman.LastErrorText)
    Exit Sub
End If