If you see this error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
STARTTLS has already happened and OpenSSL has already come into play since that message comes from 'ssl_err.c:665' in OpenSSL source code (the line number refers to version 1.1.0g). There must be some problem with Nim's usage of OpenSSL in the net module (which is where the library is called, you will not see it in smtp.nim)