This project provides an Integrant component for the Postal email sending library, and is part of the Duct framework.
Add the following dependency to your deps.edn file:
org.duct-framework/client.smtp.postal {:mvn/version "0.1.0"}
Or to your Leiningen project file:
[org.duct-framework/client.smtp.postal "0.1.0"]
The :duct.client.smtp/postal component can be used to send emails via
sendmail, SMTP, or append them to a file instead. The latter option is
typically used in development or testing.
The component will initiate into a function that takes a map representing a mail message. For more information, see the Postal README.
To use this component with your system's sendmail, use an empty configuration map.
{:duct.client.smtp/postal {}}
To use this component with SMTP you will need to supply a :host
option, and likely a :user and :pass option as well. For example:
{:duct.client.smtp/postal
{:host "smtp.gmail.com"
:user "example_bob@gmail.com"
:pass "hunter2"
:port 587
:tls true}}
In development and testing it's often undesirable to send actual mail
out, so instead we can supply a :file argument with a filepath, and
each sent mail will be instead appended to this file instead:
{:duct.client.smtp/postal
{:file "log/mail.log"}}
Copyright © 2026 James Reeves
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
Can you improve this documentation?Edit on GitHub
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 |