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
| Column | Type | Notes |
|---|---|---|
email | string | required |
name | string | display name |
reply_to_email | string | |
postmark_sender_signature_id | integer | ID of the Sender Signature in Postmark |
user_id | bigint | host app User, optional, no foreign key constraint |
Associations
belongs_to :user, class_name: "::User", optional: truehas_many :lists: lists this sender is the default sender ofhas_many :messages→ Messagehas_many :dispatches→ Dispatch
All three has_many use dependent: :restrict_with_exception: a sender with lists, messages or dispatches can't be destroyed.
Validations
emailpresence
Creating from a User
See init_sender.