I tested with smtp4dev both through the CMS and through a simple smtp client program I wrote for testing purposes. The smtp4dev server receives the emails from the custom app, but I receive the same error messages when I try to relay those messages to the on-premise smtp server. I also receive a different message when I set the smtp4dev test server as the default smtp server on Kentico 12.
"An error occurred while attempting to establish an SSL or TLS connection.
This usually means that the SSL certificate presented by the server is not trusted by the system for one or more of the following reasons:
- The server is using a self-signed certificate which cannot be verified.
- The local system is missing a Root or Intermediate certificate needed to verify the server's certificate.
- A Certificate Authority CRL server for one or more of the certificates for one or more of the certificates in the chain is temporarily unavailable.
- The certificate presented by the server is expired or invalid.
- The set of SSL/TLS protocols supported by the client and server do not match.
- You are trying to connect to a port that does not support SSL/TLS.
See https://github.com/jstedfast/mailkit/blob/master/FAQ.md#SslHandshakeException for possible solutions.
The handshake failed due to an unexpected packet format."
I will continue running some tests but I'll be looking into the server SSL certificates and other options. As always, thanks for your input. Any other suggestions would be helpful as well.
Marcelo