Sample code for 30+ languages & platforms
AutoIt

Transition from Email.GetSignedByCertChain to Email.LastSignerCert

Provides instructions for replacing deprecated GetSignedByCertChain method calls with LastSignerCert.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oEmail = ObjCreate("Chilkat.Email")

; ...
; ...

; ------------------------------------------------------------------------
; The GetSignedByCertChain method is deprecated:

Local $oCertChainObj = $oEmail.GetSignedByCertChain()
If ($oEmail.LastMethodSuccess = False) Then
    ConsoleWrite($oEmail.LastErrorText & @CRLF)
    Exit
EndIf

; ...
; ...

; ------------------------------------------------------------------------
; Do the equivalent using LastSignerCert to get the signing certificate,
; then build the cert chain from the signing certificate object.

$oSignerCert = ObjCreate("Chilkat.Cert")
$bSuccess = $oEmail.LastSignerCert(0,$oSignerCert)
If ($bSuccess = False) Then
    ConsoleWrite($oEmail.LastErrorText & @CRLF)
    Exit
EndIf

; Get the certificate chain from the signer certificate.
$oCertChain = ObjCreate("Chilkat.CertChain")
$bSuccess = $oSignerCert.BuildCertChain($oCertChain)
If ($bSuccess = False) Then
    ConsoleWrite($oSignerCert.LastErrorText & @CRLF)
    Exit
EndIf