Skip to content

Sender ​

An identity used to send messages, optionally associated with a User from the host app. It has a corresponding Sender Signature in Postmark.

Columns ​

ColumnTypeNotes
emailstringrequired
namestringdisplay name
reply_to_emailstring
postmark_sender_signature_idintegerID of the Sender Signature in Postmark
user_idbiginthost app User, optional, no foreign key constraint

Associations ​

  • belongs_to :user, class_name: "::User", optional: true
  • has_many :lists: lists this sender is the default sender of
  • has_many :messages → Message
  • has_many :dispatches → Dispatch

All three has_many use dependent: :restrict_with_exception: a sender with lists, messages or dispatches can't be destroyed.

Validations ​

  • email presence

Creating from a User ​

See init_sender.

Released under the MIT License.