Package-level declarations

Types

Link copied to clipboard

SmtpSocketFactory based on Foundation streams, using the system's TLS stack and trust store.

Link copied to clipboard
class KtorSmtpSocketFactory(tls: TLSConfigBuilder.() -> Unit = {}) : SmtpSocketFactory

SmtpSocketFactory based on ktor-network, with TLS from ktor-network-tls.

Link copied to clipboard
class NodeSmtpSocketFactory(tlsOptions: dynamic = null) : SmtpSocketFactory

SmtpSocketFactory based on the Node.js net and tls modules. Not available in browsers.

Link copied to clipboard
sealed interface SmtpAuth

Credentials for SMTP AUTH (RFC 4954).

Link copied to clipboard
class SmtpConfig(val host: String, val port: Int = SmtpSecurity.STARTTLS.defaultPort, val security: SmtpSecurity = SmtpSecurity.STARTTLS, val auth: SmtpAuth? = null, val clientHostname: String = "localhost", val connectTimeout: Duration = 30.seconds, val commandTimeout: Duration = 5.minutes, val dataTimeout: Duration = 10.minutes, val maxConnections: Int = 1, val reuseConnections: Boolean = true, val failOnRejectedRecipient: Boolean = true, val allowInsecureAuth: Boolean = false, val socketFactory: SmtpSocketFactory = defaultSmtpSocketFactory())

Settings of an SmtpMailer.

Link copied to clipboard
class SmtpException(message: String, val replyCode: Int? = null, val enhancedStatusCode: String? = null, cause: Throwable? = null) : MailException

An SMTP failure. If the server rejected a command, replyCode and enhancedStatusCode are set.

Link copied to clipboard
class SmtpMailer(val config: SmtpConfig) : Mailer

Sends emails via SMTP, keeping up to SmtpConfig.maxConnections connections open.

Link copied to clipboard
class SmtpMailerBuilder(var host: String)

Builder for SmtpMailer, see smtpMailer.

Link copied to clipboard

How the connection to the SMTP server is secured.

Link copied to clipboard
interface SmtpSocket

A bidirectional byte stream to an SMTP server that can be upgraded to TLS.

Link copied to clipboard
fun interface SmtpSocketFactory

Opens SmtpSockets.

Functions

Link copied to clipboard

The socket factory of the current platform.

The socket factory of the current platform.

The socket factory of the current platform.

The socket factory of the current platform.

The socket factory of the current platform.

The socket factory of the current platform.

Link copied to clipboard
inline fun smtpMailer(host: String, builder: SmtpMailerBuilder.() -> Unit = {}): SmtpMailer

Create an SmtpMailer and register it at MailerManager.