Liking cljdoc? Tell your friends :D

boundary.email.core.email

Core email processing functions.

Pure functions for preparing, validating, and formatting emails. No side effects - all I/O happens in the shell layer.

Core email processing functions.

Pure functions for preparing, validating, and formatting emails.
No side effects - all I/O happens in the shell layer.
raw docstring

add-bccclj

(add-bcc email bcc-recipients)

Add BCC recipients to email (pure function).

Args: email - Email map bcc-recipients - Email address or vector of addresses

Returns: Email map with BCC header added

Add BCC recipients to email (pure function).

Args:
  email - Email map
  bcc-recipients - Email address or vector of addresses

Returns:
  Email map with BCC header added
sourceraw docstring

add-ccclj

(add-cc email cc-recipients)

Add CC recipients to email (pure function).

Args: email - Email map cc-recipients - Email address or vector of addresses

Returns: Email map with CC header added

Add CC recipients to email (pure function).

Args:
  email - Email map
  cc-recipients - Email address or vector of addresses

Returns:
  Email map with CC header added
sourceraw docstring

add-reply-toclj

(add-reply-to email reply-to)

Add Reply-To header to email (pure function).

Args: email - Email map reply-to - Reply-to email address

Returns: Email map with Reply-To header added

Add Reply-To header to email (pure function).

Args:
  email - Email map
  reply-to - Reply-to email address

Returns:
  Email map with Reply-To header added
sourceraw docstring

email-summaryclj

(email-summary email)

Create summary of email for logging/monitoring (pure function).

Args: email - Email map

Returns: Summary map with key fields

Create summary of email for logging/monitoring (pure function).

Args:
  email - Email map

Returns:
  Summary map with key fields
sourceraw docstring

format-headersclj

(format-headers headers)

Format and normalize email headers (pure function).

Args: headers - Map of header key-value pairs

Returns: Normalized headers map with kebab-case keys

Format and normalize email headers (pure function).

Args:
  headers - Map of header key-value pairs

Returns:
  Normalized headers map with kebab-case keys
sourceraw docstring

normalize-recipientsclj

(normalize-recipients recipients)

Normalize recipients to vector format.

Args: recipients - String or vector of email addresses

Returns: Vector of email addresses

Normalize recipients to vector format.

Args:
  recipients - String or vector of email addresses

Returns:
  Vector of email addresses
sourceraw docstring

prepare-emailclj

(prepare-email email-input email-id now)

Prepare email for sending (pure function).

Args: email-input - Map with required keys: :to - Email address or vector of addresses :from - Email address :subject - Email subject :body - Email body Optional keys: :headers - Map of email headers :attachments - Vector of attachment maps :metadata - Map of metadata email-id - UUID generated by shell layer now - Current timestamp generated by shell layer

Returns: Email map with: :id - Generated UUID :to - Normalized vector of recipients :from - From address :subject - Subject line :body - Email body :headers - Normalized headers (if provided) :attachments - Attachments (if provided) :metadata - Metadata (if provided) :created-at - Timestamp of creation

Prepare email for sending (pure function).

Args:
  email-input - Map with required keys:
                :to - Email address or vector of addresses
                :from - Email address
                :subject - Email subject
                :body - Email body
                Optional keys:
                :headers - Map of email headers
                :attachments - Vector of attachment maps
                :metadata - Map of metadata
  email-id - UUID generated by shell layer
  now - Current timestamp generated by shell layer

Returns:
  Email map with:
    :id - Generated UUID
    :to - Normalized vector of recipients
    :from - From address
    :subject - Subject line
    :body - Email body
    :headers - Normalized headers (if provided)
    :attachments - Attachments (if provided)
    :metadata - Metadata (if provided)
    :created-at - Timestamp of creation
sourceraw docstring

valid-email-address?clj

(valid-email-address? email)

Check if string is valid email format (basic RFC 5322).

Args: email - Email address string

Returns: true if valid email format, false otherwise

Check if string is valid email format (basic RFC 5322).

Args:
  email - Email address string

Returns:
  true if valid email format, false otherwise
sourceraw docstring

validate-emailclj

(validate-email email)

Validate complete email structure (pure function).

Args: email - Email map

Returns: Map with: :valid? - Boolean indicating validity :errors - Vector of error messages (if invalid)

Validate complete email structure (pure function).

Args:
  email - Email map

Returns:
  Map with:
    :valid? - Boolean indicating validity
    :errors - Vector of error messages (if invalid)
sourceraw docstring

validate-recipientsclj

(validate-recipients recipients)

Validate recipient email addresses (pure function).

Args: recipients - Vector of email address strings or single email string

Returns: Map with: :valid? - Boolean indicating if all emails are valid :valid-emails - Vector of valid email addresses :invalid-emails - Vector of invalid email addresses

Validate recipient email addresses (pure function).

Args:
  recipients - Vector of email address strings or single email string

Returns:
  Map with:
    :valid? - Boolean indicating if all emails are valid
    :valid-emails - Vector of valid email addresses
    :invalid-emails - Vector of invalid email addresses
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