Verify Method
Verifies the signature of the message.
The method checks that the message has not been tampered and its sender is not faked.
[Visual Basic] blnResult = ObjectName.Verify |
Parameters: | None | |
Return value As Boolean | True if successful, False if error has occurred. | |
Remarks: |
This method allows the developer to assure the message was written by the known author and was not altered during the transmission. The developer can also use the Verified property to check if the message was verified successfully. |
Usage example:
' This example loads the message from file and verifies it. Dim objSMIME, objMsg ' Using Visual Basic to create the objects Set objMsg = CreateObject("MailBee.Message") Set objSMIME = CreateObject("MailBee.SMIME") ' Using ASP to create the objects 'Set objMsg = Server.CreateObject("MailBee.Message") 'Set objSMIME = Server.CreateObject("MailBee.SMIME") ' Specify MailBee license key objSMIME.LicenseKey = "put your license key here" ' Load the message from file objMsg.ImportFromFile "mail_src.eml" ' Specify the message for the further processing Set objSMIME.Message = objMsg ' Verify the message objSMIME.Verify ' Check if any errors occurred If (objSMIME.SMIMEError <> 0) Or (objSMIME.SMIMESpecificError <> 0) Then ' Display the code of the last occured ' In ASP use Response.Write instead of MsgBox MsgBox "SMIMEError = " & objSMIME.SMIMEError & " SMIMESpecificError = " & _ objSMIME.SMIMESpecificError End If ' Check if the message was verified successfully If objSMIME.Verified Then MsgBox "This message is verified." End If
See Also:
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.