Pure functions for IMAP message parsing and filtering. No I/O, no side effects.
Pure functions for IMAP message parsing and filtering. No I/O, no side effects.
Pure functions for SMTP email preparation and validation. No I/O, no side effects.
Pure functions for SMTP email preparation and validation. No I/O, no side effects.
Pure functions for Twilio API data transformation. No I/O, no side effects.
Pure functions for Twilio API data transformation. No I/O, no side effects.
Protocol definitions for external service adapters.
Defines three integration protocols:
Protocol definitions for external service adapters. Defines three integration protocols: - ISmtpProvider — outbound email via SMTP - IImapMailbox — inbound email via IMAP - ITwilioMessaging — Twilio SMS and WhatsApp messaging
Malli validation schemas for external service adapters.
Malli validation schemas for external service adapters.
IMAP mailbox adapter implementing IImapMailbox.
Uses javax.mail for IMAP access. Connections are opened per-call and closed in a finally block. IMAP UIDs are accessed by casting the Folder to IMAPFolder.
Usage: (def mailbox (create-imap-mailbox {:host "imap.gmail.com" :port 993 :username "user@gmail.com" :password "app-password" :ssl? true})) (fetch-unread! mailbox)
IMAP mailbox adapter implementing IImapMailbox.
Uses javax.mail for IMAP access. Connections are opened per-call and closed
in a finally block. IMAP UIDs are accessed by casting the Folder to IMAPFolder.
Usage:
(def mailbox (create-imap-mailbox
{:host "imap.gmail.com"
:port 993
:username "user@gmail.com"
:password "app-password"
:ssl? true}))
(fetch-unread! mailbox)SMTP transport adapter implementing ISmtpProvider.
Uses javax.mail for SMTP communication. This adapter is positioned as a transport-level provider — independent of the email lib's higher-level abstraction (templating, job queuing, etc.).
Usage: (def provider (create-smtp-provider {:host "smtp.gmail.com" :port 587 :username "user@gmail.com" :password "app-password" :tls? true :from "no-reply@example.com"})) (send-email! provider {:to "recipient@example.com" :subject "Hello" :body "World"})
SMTP transport adapter implementing ISmtpProvider.
Uses javax.mail for SMTP communication. This adapter is positioned as a
transport-level provider — independent of the email lib's higher-level
abstraction (templating, job queuing, etc.).
Usage:
(def provider (create-smtp-provider
{:host "smtp.gmail.com"
:port 587
:username "user@gmail.com"
:password "app-password"
:tls? true
:from "no-reply@example.com"}))
(send-email! provider {:to "recipient@example.com"
:subject "Hello"
:body "World"})Twilio messaging adapter implementing ITwilioMessaging.
Uses clj-http with Basic auth (account-sid + auth-token). SMS and WhatsApp share the same Messages endpoint; the only difference is the whatsapp: prefix added by core/twilio.
Usage: (def twilio (create-twilio-adapter {:account-sid "ACxxx" :auth-token "token" :from-number "+15005550006"})) (send-sms! twilio {:to "+31612345678" :body "Hello!"})
Twilio messaging adapter implementing ITwilioMessaging.
Uses clj-http with Basic auth (account-sid + auth-token).
SMS and WhatsApp share the same Messages endpoint; the only difference
is the whatsapp: prefix added by core/twilio.
Usage:
(def twilio (create-twilio-adapter
{:account-sid "ACxxx"
:auth-token "token"
:from-number "+15005550006"}))
(send-sms! twilio {:to "+31612345678" :body "Hello!"})Integrant lifecycle wiring for the external service adapters.
Registers init-key and halt-key! multimethods for: :boundary.external/smtp — SMTP transport provider :boundary.external/imap — IMAP mailbox reader :boundary.external/twilio — Twilio SMS / WhatsApp
All three keys are opt-in: add them to :active in config.edn to enable. They are shipped in :inactive by default.
Integrant lifecycle wiring for the external service adapters. Registers init-key and halt-key! multimethods for: :boundary.external/smtp — SMTP transport provider :boundary.external/imap — IMAP mailbox reader :boundary.external/twilio — Twilio SMS / WhatsApp All three keys are opt-in: add them to :active in config.edn to enable. They are shipped in :inactive by default.
No vars found in this namespace.
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 |