SquatchMail.EmailRecipient (SquatchMail v0.1.0)

Copy Markdown View Source

A normalized recipient of an email (a to/cc/bcc address).

Recipients are stored in their own table so that addresses can be searched and indexed independently of the parent email.

Summary

Functions

Builds a changeset for a recipient.

Returns the list of valid recipient kinds.

Types

t()

@type t() :: %SquatchMail.EmailRecipient{
  __meta__: term(),
  address: term(),
  email: term(),
  email_id: term(),
  id: term(),
  inserted_at: term(),
  kind: term(),
  name: term(),
  updated_at: term()
}

Functions

changeset(recipient, attrs)

@spec changeset(t(), map()) :: Ecto.Changeset.t()

Builds a changeset for a recipient.

kinds()

@spec kinds() :: [String.t()]

Returns the list of valid recipient kinds.