wodSmtpServer ActiveX Control - RelayCertificate Method
      
 

Description

Called when remote server provides its certificate.


Return Type

None  


Syntax

object.RelayCertificate Owner, Relay, Cert, ErrorCode, ErrorText, Accept



The RelayCertificate Method syntax has these parts:

Part Description
object An expression evaluating to an object of type wodSmtpNotify.
Owner Required. A wodSmtpServer object. Reference to wodSmtpServerCom instance that called this callback method.
Relay Required. A SmtpRelay object. Holds reference to relay that uses SSL encryption.
Cert Required. An ICertificate object. Reference to the certificate received from the server.
ErrorCode Required. A Long value.

Error that occured during certificate validation, if any.

ErrorText Required. A String value. Text description of errors found during certificate validation, one per line.
Accept Required. A Boolean value. You should set it to False if you don't want to accept the certificate.

Remarks

NOTE: This method is called only if you implemented IwodSmtpNotify interface in your application, and wodSmtpServer1.Notification property has received reference to instance of your implementation.

This notification method is called when Relay establishes SSL encryption with 3rd party server (only if you set Relay.Security property to anything other than SecurityNone). You can test here to see if remote server has a valid certificate, and if you will proceed with sending the message.

You should check if ErrorCode contains error for certificate validation, in which case ErrorText will hold all errors found during validation - one per line.

If you will accept the certificate, set Accept argument to True.