PowerShell
PowerShell
Transition from MailMan.GetPop3SslServerCert to MailMan.GetServerCert
Provides instructions for replacing deprecated GetPop3SslServerCert method calls with GetServerCert.Chilkat PowerShell Downloads
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$success = $false
$mailman = New-Object Chilkat.MailMan
# ...
# ...
# ------------------------------------------------------------------------
# The GetPop3SslServerCert method is deprecated:
$certObj = $mailman.GetPop3SslServerCert()
if ($mailman.LastMethodSuccess -eq $false) {
$($mailman.LastErrorText)
exit
}
# ...
# ...
# ------------------------------------------------------------------------
# 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 POP3 email server certificate..
$useSmtp = $false
$certOut = New-Object Chilkat.Cert
$success = $mailman.GetServerCert($useSmtp,$certOut)
if ($success -eq $false) {
$($mailman.LastErrorText)
exit
}