The SMTP submission client: one message per connection, over TLS, inside one wall-clock deadline (SPEC §5).
The deadline is a watchdog, not a timeout per call. A virtual thread closes the socket when the deadline passes, which makes whatever is blocked — the connect, the TLS handshake, a read, a write — throw at once. A timeout per read would let a server that drips one byte at a time hold a send for ever; a socket write has no timeout at all. Name resolution, which no socket bounds, runs on a thread of its own and is waited for only until the deadline.
What a failure says. The stage it happened at and the server's reply code —
refused at RCPT with 550 — and never the recipient, the server's own text, the
message or a password: the caller logs what it is given (auth-base logs a delivery
failure whole), and a reply such as 550 <ada@…> unknown carries the address.
The SMTP submission client: one message per connection, over TLS, inside one wall-clock deadline (SPEC §5). **The deadline is a watchdog, not a timeout per call.** A virtual thread closes the socket when the deadline passes, which makes whatever is blocked — the connect, the TLS handshake, a read, a write — throw at once. A timeout per read would let a server that drips one byte at a time hold a send for ever; a socket write has no timeout at all. Name resolution, which no socket bounds, runs on a thread of its own and is waited for only until the deadline. **What a failure says.** The stage it happened at and the server's reply code — `refused at RCPT with 550` — and never the recipient, the server's own text, the message or a password: the caller logs what it is given (auth-base logs a delivery failure whole), and a reply such as `550 <ada@…> unknown` carries the address.
(send-message! {:keys [host port tls deadline-ms] :as mailer} message)Delivers message through the server mailer names, or throws a refusal naming
the stage — and the reply code, when the server answered one — under :stage and
:code, or :deadline-ms when the deadline passed first.
Delivers `message` through the server `mailer` names, or throws a refusal naming the stage — and the reply code, when the server answered one — under `:stage` and `:code`, or `:deadline-ms` when the deadline passed first.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |