In-memory email queue implementing EmailQueueProtocol.
A lightweight, single-process queued-sending mode: queue-email! enqueues,
process-queue! drains one entry through the wrapped sender, with bounded
retry (failed sends are re-queued up to :max-retries times). Backed by a
thread-safe ConcurrentLinkedDeque.
For distributed queuing across replicas use jobs-integration (jobs module)
instead — this adapter's state is per-process and lost on restart.
In-memory email queue implementing `EmailQueueProtocol`. A lightweight, single-process queued-sending mode: `queue-email!` enqueues, `process-queue!` drains one entry through the wrapped sender, with bounded retry (failed sends are re-queued up to `:max-retries` times). Backed by a thread-safe `ConcurrentLinkedDeque`. For distributed queuing across replicas use `jobs-integration` (jobs module) instead — this adapter's state is per-process and lost on restart.
SMTP email adapter — delegates raw transport to libs/external SmtpProviderAdapter.
This adapter sits at the boundary between the email library's domain model (Email with :id, :created-at, :attachments, :metadata) and the external library's transport layer (OutboundEmail). It translates between the two and delegates all javax.mail work to boundary.external.shell.adapters.smtp.
Responsibility split: libs/email — Email domain model, validation, preparation, job queuing libs/external — Raw SMTP transport (javax.mail, TLS/SSL, HTML multipart)
Usage: (def sender (create-smtp-sender {:host "smtp.gmail.com" :port 587 :username "user@gmail.com" :password "app-password" :tls? true})) (send-email! sender prepared-email)
SMTP email adapter — delegates raw transport to libs/external SmtpProviderAdapter.
This adapter sits at the boundary between the email library's domain model
(Email with :id, :created-at, :attachments, :metadata) and the external
library's transport layer (OutboundEmail). It translates between the two and
delegates all javax.mail work to boundary.external.shell.adapters.smtp.
Responsibility split:
libs/email — Email domain model, validation, preparation, job queuing
libs/external — Raw SMTP transport (javax.mail, TLS/SSL, HTML multipart)
Usage:
(def sender (create-smtp-sender
{:host "smtp.gmail.com"
:port 587
:username "user@gmail.com"
:password "app-password"
:tls? true}))
(send-email! sender prepared-email)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 |