Liking cljdoc? Tell your friends :D

boundary.external.ports

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
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
raw docstring

IImapMailboxcljprotocol

Protocol for reading messages from an IMAP mailbox.

Protocol for reading messages from an IMAP mailbox.

close!clj

(close! this)

Close IMAP connection. Returns true.

Close IMAP connection. Returns true.

delete-message!clj

(delete-message! this uid)

Delete a message by UID.

Returns: Map with :success? and optional :error

Delete a message by UID.

Returns:
  Map with :success? and optional :error

fetch-messages!clj

(fetch-messages! this)
(fetch-messages! this opts)

Fetch messages from the mailbox.

Args: opts - ImapFetchOptions map (optional): :folder - folder name (default INBOX) :limit - max messages to fetch :unread-only? - fetch only unread messages :since - only messages after this inst

Returns: Map with: :success? - boolean :messages - vector of InboundMessage maps :count - integer :error - map {:message :type} (if failed)

Fetch messages from the mailbox.

Args:
  opts - ImapFetchOptions map (optional):
         :folder      - folder name (default INBOX)
         :limit       - max messages to fetch
         :unread-only? - fetch only unread messages
         :since       - only messages after this inst

Returns:
  Map with:
    :success?  - boolean
    :messages  - vector of InboundMessage maps
    :count     - integer
    :error     - map {:message :type} (if failed)

fetch-unread!clj

(fetch-unread! this)
(fetch-unread! this limit)

Fetch unread messages. Returns same shape as fetch-messages!.

Fetch unread messages. Returns same shape as fetch-messages!.

mark-read!clj

(mark-read! this uid)

Mark a message as read by UID.

Returns: Map with :success? and optional :error

Mark a message as read by UID.

Returns:
  Map with :success? and optional :error
sourceraw docstring

ISmtpProvidercljprotocol

Protocol for outbound SMTP email sending.

Protocol for outbound SMTP email sending.

send-email!clj

(send-email! this email)

Send an email synchronously.

Args: email - OutboundEmail map with :to :from :subject :body etc.

Returns: Map with: :success? - boolean :message-id - string (if successful) :error - map {:message :type} (if failed)

Send an email synchronously.

Args:
  email - OutboundEmail map with :to :from :subject :body etc.

Returns:
  Map with:
    :success?    - boolean
    :message-id  - string (if successful)
    :error       - map {:message :type} (if failed)

send-email-async!clj

(send-email-async! this email)

Send an email asynchronously. Returns a future of the send-email! result.

Send an email asynchronously. Returns a future of the send-email! result.

test-connection!clj

(test-connection! this)

Verify SMTP server is reachable and credentials are valid.

Returns: Map with: :success? - boolean :error - map {:message :type} (if failed)

Verify SMTP server is reachable and credentials are valid.

Returns:
  Map with:
    :success? - boolean
    :error    - map {:message :type} (if failed)
sourceraw docstring

ITwilioMessagingcljprotocol

Protocol for sending SMS and WhatsApp messages via Twilio.

Protocol for sending SMS and WhatsApp messages via Twilio.

get-message-status!clj

(get-message-status! this sid)

Get the delivery status of a message by SID.

Returns: Map with: :success? - boolean :status - string (e.g. "delivered", "failed") :error - map {:message :type} (if failed)

Get the delivery status of a message by SID.

Returns:
  Map with:
    :success? - boolean
    :status   - string (e.g. "delivered", "failed")
    :error    - map {:message :type} (if failed)

send-sms!clj

(send-sms! this input)

Send an SMS message.

Args: input - SendMessageInput map with :to :body and optional :from

Returns: MessageResult map with :success? :message-sid :status :error

Send an SMS message.

Args:
  input - SendMessageInput map with :to :body and optional :from

Returns:
  MessageResult map with :success? :message-sid :status :error

send-whatsapp!clj

(send-whatsapp! this input)

Send a WhatsApp message. Automatically prefixes whatsapp: to To/From.

Args: input - SendMessageInput map with :to :body and optional :from

Returns: MessageResult map with :success? :message-sid :status :error

Send a WhatsApp message. Automatically prefixes whatsapp: to To/From.

Args:
  input - SendMessageInput map with :to :body and optional :from

Returns:
  MessageResult map with :success? :message-sid :status :error
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close