Class: Mailtrap::InboundMessage
- Inherits:
-
Struct
- Object
- Struct
- Mailtrap::InboundMessage
- Defined in:
- lib/mailtrap/inbound_message.rb
Overview
Data Transfer Object for an inbound message (summary in list, full details when fetched by ID)
rubocop:disable Lint/StructNewOverride -- size is an API field that shadows Struct#size
Instance Attribute Summary collapse
-
#attachments ⇒ Array<InboundAttachment>
readonly
The message attachments.
-
#bcc ⇒ Array<String>
readonly
Bcc addresses.
-
#cc ⇒ Array<String>
readonly
Cc addresses.
-
#from ⇒ String?
readonly
Sender address.
-
#headers ⇒ Hash?
readonly
Raw message headers.
-
#html_body ⇒ String?
readonly
Decoded HTML body (only when fetched by ID).
-
#html_size ⇒ Integer?
readonly
HTML body size in bytes.
-
#id ⇒ String
readonly
The Mailtrap object ID (not the RFC Message-ID header).
-
#in_reply_to ⇒ String?
readonly
Value of the RFC 5322 In-Reply-To header.
-
#inbox_id ⇒ Integer
readonly
The inbox the message was received in.
-
#raw_message_expires_at ⇒ String?
readonly
When the raw message URL expires (only when fetched by ID).
-
#raw_message_url ⇒ String?
readonly
Signed URL to download raw .eml (only when fetched by ID).
-
#received_at ⇒ String
readonly
ISO 8601 timestamp when the message was received.
-
#references ⇒ Array<String>
readonly
Values of the RFC 5322 References header.
-
#reply_to ⇒ String?
readonly
Reply-To address.
-
#rfc_message_id ⇒ String?
readonly
Value of the RFC 5322 Message-ID header.
-
#size ⇒ Integer?
readonly
Total message size in bytes.
-
#subject ⇒ String?
readonly
Email subject.
-
#text_body ⇒ String?
readonly
Decoded text body (only when fetched by ID).
-
#text_size ⇒ Integer?
readonly
Text body size in bytes.
-
#thread_id ⇒ String?
readonly
ID of the thread this message belongs to, if any.
-
#to ⇒ Array<String>
readonly
Recipient addresses.
Instance Attribute Details
#attachments ⇒ Array<InboundAttachment> (readonly)
The message attachments
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def @attachments end |
#bcc ⇒ Array<String> (readonly)
Bcc addresses
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def bcc @bcc end |
#cc ⇒ Array<String> (readonly)
Cc addresses
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def cc @cc end |
#from ⇒ String? (readonly)
Sender address
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def from @from end |
#headers ⇒ Hash? (readonly)
Raw message headers
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def headers @headers end |
#html_body ⇒ String? (readonly)
Decoded HTML body (only when fetched by ID)
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def html_body @html_body end |
#html_size ⇒ Integer? (readonly)
HTML body size in bytes
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def html_size @html_size end |
#id ⇒ String (readonly)
The Mailtrap object ID (not the RFC Message-ID header)
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def id @id end |
#in_reply_to ⇒ String? (readonly)
Value of the RFC 5322 In-Reply-To header
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def in_reply_to @in_reply_to end |
#inbox_id ⇒ Integer (readonly)
The inbox the message was received in
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def inbox_id @inbox_id end |
#raw_message_expires_at ⇒ String? (readonly)
When the raw message URL expires (only when fetched by ID)
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def @raw_message_expires_at end |
#raw_message_url ⇒ String? (readonly)
Signed URL to download raw .eml (only when fetched by ID)
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def @raw_message_url end |
#received_at ⇒ String (readonly)
ISO 8601 timestamp when the message was received
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def received_at @received_at end |
#references ⇒ Array<String> (readonly)
Values of the RFC 5322 References header
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def references @references end |
#reply_to ⇒ String? (readonly)
Reply-To address
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def reply_to @reply_to end |
#rfc_message_id ⇒ String? (readonly)
Value of the RFC 5322 Message-ID header
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def @rfc_message_id end |
#size ⇒ Integer? (readonly)
Total message size in bytes
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def size @size end |
#subject ⇒ String? (readonly)
Email subject
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def subject @subject end |
#text_body ⇒ String? (readonly)
Decoded text body (only when fetched by ID)
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def text_body @text_body end |
#text_size ⇒ Integer? (readonly)
Text body size in bytes
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def text_size @text_size end |
#thread_id ⇒ String? (readonly)
ID of the thread this message belongs to, if any
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def thread_id @thread_id end |
#to ⇒ Array<String> (readonly)
Recipient addresses
29 30 31 |
# File 'lib/mailtrap/inbound_message.rb', line 29 def to @to end |