DataFlex
DataFlex
Get the Signer Details of a Signed Email
See more Email Object Examples
Demonstrates the read-only Chilkat Email.SignedBy property. If the email was received digitally signed, this contains the fields of the signer certificate's Subject Distinguished Name, for example: US, 94105, California, San Francisco, 100 Market Street, Northwind Research LLC, Engineering, Avery Morgan. The values appear without the attribute-name prefixes (C=, ST=, L=, O=, CN=). It is intended for display or diagnostics; use LastSignerCert when the certificate object itself is needed.
Background: Every certificate identifies its owner with a Subject Distinguished Name (Subject DN) — a structured set of fields like Country (
C), State (ST), Organization (O), and Common Name (CN). The CN is typically the person or entity the certificate was issued to. SignedBy gives you a human-readable rendering of that identity, which is handy for showing "who signed this?" without needing to parse the certificate yourself.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Boolean iSuccess
Handle hoEmail
String sTemp1
Boolean bTemp1
Move False To iSuccess
// Demonstrates the read-only Email.SignedBy property. If the email was received
// digitally signed, this contains the fields of the signer certificate's SubjectDN
// (without the C=, ST=, L=, O=, CN= attribute names).
Get Create (RefClass(cComChilkatEmail)) To hoEmail
If (Not(IsComObjectCreated(hoEmail))) Begin
Send CreateComObject of hoEmail
End
Get ComLoadEml Of hoEmail "qa_data/eml/signed.eml" To iSuccess
If (iSuccess = False) Begin
Get ComLastErrorText Of hoEmail To sTemp1
Showln sTemp1
Procedure_Return
End
Get ComReceivedSigned Of hoEmail To bTemp1
If (bTemp1 = True) Begin
Get ComSignedBy Of hoEmail To sTemp1
Showln "Signed by: " sTemp1
End
Else Begin
Showln "This email was not signed."
End
// Note: Paths such as "qa_data/..." are relative local filesystem paths,
// relative to the current working directory of the running application.
End_Procedure