Back to product page
- Introduction
- License agreement
- Getting Started
- Enumerations
- Objects
- wodSmtp
- Methods
- Properties
- Authentication
- Blocking
- Certificate
- CharSet
- DNSHostname
- Hostname
- LastError
- LastErrorText
- Login
- MailFrom
- MailTo
- Message
- MyHostname
- MyIP
- Notification
- Password
- Port
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- RequestReceipt
- RetryCount
- RetryWait
- Security
- State
- StateText
- Tag
- Timeout
- Transcript
- UseIPv6
- Version
- Events
- IwodSmtpClientNotify
- SmtpEncoder
- SmtpHdr
- SmtpHdrs
- SmtpMsg
- SmtpMsgs
- wodSmtp
- How to get support?
- Technical information
- Fast notifications interface
- Error list
HostCertificate Event
Fires when remote server provides its certificate.
Syntax
- Basic
object.HostCertificate (ByRef Cert, ByVal ErrorCode, ByVal ErrorText, ByRef Accept)
The HostCertificate(object,Cert,ErrorCode,ErrorText,Accept) syntax has these parts:
The HostCertificate(object,Cert,ErrorCode,ErrorText,Accept) syntax has these parts:
object | An expression evaluating to an object of type wodSmtp |
Cert | An ICertificate object. Reference to Certificate object that holds information about server's certificate. |
ErrorCode | A Long value. Code of the error, if any. |
ErrorText | A String value. Text description of the error, if any. |
Accept | A Boolean value. When set to False, wodSmtp will close the connection. |
Remarks
Once wodSmtp connects to SSL/TLS server, it will receive server's certificate that holds information about server's validity. It will contain information such as server's name, organization, valid dates etc.. Certificates are usually signed by some known CA (Certificate Authority) whose responsibility is to prove that server is really the one he's representing to be.wodSmtp will try to detect if remote certificate should be trusted or not. If any errors are found, ErrorText will contain line-by-line descriptions for all errors found, and ErrorCode will contain first error that was found. If ErrorText is empty (and ErrorCode is 0), certificate should be trusted. wodSmtp will load all certificates in your Windows Certificate store (ROOT and MY stores) and remote certificate will be tested against all certificates in those stores.
Even if no error is found - make sure certificate's CommonName property point to the Hostname you're connecting to! This test should be done by your application. If you think remote server's certificate is invalid, you should set Accept parameter to False and wodSmtp will immediately close the connection.