Documentation Index
Fetch the complete documentation index at: https://mintlify.com/puiusabin/bun-smtp/llms.txt
Use this file to discover all available pages before exploring further.
Constructor
Create a new SMTP server instance.Configuration options for the server. See Configuration for all available options.
Methods
listen()
Start the SMTP server and bind to a port.Port number to bind to
Hostname or IP address to bind to
Function called when the server starts listening
this (for chaining)
The
listening event is emitted after the server successfully binds to the port.close()
Gracefully shut down the server. Active connections are allowed to finish within thecloseTimeout period.
Function called when the server has fully closed
this (for chaining)
updateSecureContext()
Hot-reload TLS certificates without restarting the server. New connections will use the updated certificates.Event Methods
on()
Register an event listener.Callback function to invoke when the event is emitted
this (for chaining)
once()
Register a one-time event listener that is automatically removed after firing once.Event name
Callback function to invoke once
this (for chaining)
off()
Remove an event listener.Event name
The exact listener function to remove
this (for chaining)
Properties
The resolved configuration options (defaults merged with constructor options)
Set of currently active connections
Whether the server is in the process of shutting down