class

ActionMailbox::InboundEmail

Inherits Reference < Object

Constants

STATUSES = ["pending", "processing", "delivered", "failed", "bounced"]
TABLE = "action_mailbox_inbound_emails"

Constructors

create_and_extract_message_id!(source : String) : InboundEmail

Create from the raw RFC822 source: extract (or generate) the Message-ID, upload the source as a raw_email blob, insert the row and enqueue routing (mirrors create_and_extract_message_id!).

Source
new(message_id : String, message_checksum : String, status : String = "pending")
Source

Class methods

count
Source
extract_message_id(source : String) : String | Nil
Source
generate_missing_message_id(checksum : String) : String
Source
status_index(status : String) : Int32
Source

Instance methods

bounced!
Source
bounced?
Source
delivered!
Source
delivered?
Source
failed!
Source
failed?
Source
id=(id : Int64 | Nil)
Source
mail
Source
message_checksum
Source
message_checksum=(message_checksum : String)
Source
message_id
Source
message_id=(message_id : String)
Source
new_record=(new_record : Bool)
Source
new_record?
Source
pending!
Source
pending?
Source
processed?
Source
processing!
Source
processing?
Source
raw_email_blob
Source
reload
Source
route

Route using the routing rules declared on ::ApplicationMailbox (the top-level constant, exactly like the gem resolves it).

Source
route_later

Enqueue routing (the gem uses an ActiveJob RoutingJob; P0 keeps an in-memory register of enqueued jobs — see PLAN.md deviations).

Source
save
Source
source
Source
status
Source
status=(status : String)
Source