Versions in this module Expand all Collapse all v1 v1.0.0 Dec 16, 2024 Changes in this version + const StartTls + var ErrFailedAppendCertificate = errors.New("failed to append PEM certificate") + var ErrFile = errors.New("error file") + var ErrFileDoesNotExist = errors.New("file does not exist") + var ErrNoHostname = errors.New("no hostname provided") + var ErrNoPort = errors.New("no tcp-port provided") + var ErrSslTlsNotSupported = errors.New("server does not support SSL/TLS") + var ErrStarttlsNotSupported = errors.New("server does not support STARTTLS") + var ErrUnknownProtocol = errors.New("unkown security protocol") + type ConnectNone struct + func NewConnectNone(hostname string, port int) *ConnectNone + func (c *ConnectNone) Check() error + func (c *ConnectNone) ClientConnect() (*smtp.Client, func() error, string, error) + func (c *ConnectNone) GetHostName() string + func (c *ConnectNone) GetType() types.Security + type ConnectSslTls struct + func NewConnectSslTls(hostname string, port int, rootCaPath string) *ConnectSslTls + func (c *ConnectSslTls) Check() error + func (c *ConnectSslTls) ClientConnect() (*smtp.Client, func() error, string, error) + func (c *ConnectSslTls) GetHostName() string + func (c *ConnectSslTls) GetType() types.Security + type ConnectStarttls struct + func NewConnectStarttls(hostname string, port int, rootCaPath string) *ConnectStarttls + func (c *ConnectStarttls) Check() error + func (c *ConnectStarttls) ClientConnect() (*smtp.Client, func() error, string, error) + func (c *ConnectStarttls) GetHostName() string + func (c *ConnectStarttls) GetType() types.Security + type SecureConnection interface + Check func() error + ClientConnect func() (*smtp.Client, func() error, string, error) + GetHostName func() string + GetType func() types.Security + func GetSecureConnection(st *cmdflags.Settings) (SecureConnection, error)