Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Duct client.smtp.postal Build Status

This project provides an Integrant component for the Postal email sending library, and is part of the Duct framework.

Installation

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"]

Usage

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.

Sendmail

To use this component with your system's sendmail, use an empty configuration map.

{:duct.client.smtp/postal {}}

SMTP

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}}

File appending

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"}}

License

Copyright © 2026 James Reeves

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Integrant support for the Postal mail sending library

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages