Class: Mailtrap::InboundThreadMessage

Inherits:
Struct
  • Object
show all
Defined in:
lib/mailtrap/inbound_thread_message.rb

Overview

Data Transfer Object for a message inside an inbound thread. Only visibility_status and direction are always present; placeholder entries omit the rest.

Instance Attribute Summary collapse

Instance Attribute Details

#attachments ⇒ Array<InboundAttachment>? (readonly)

The message attachments

Returns:



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def attachments
  @attachments
end

#bcc ⇒ Array<String>? (readonly)

Bcc addresses

Returns:

  • (Array<String>, nil) —

    the current value of bcc



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def bcc
  @bcc
end

#cc ⇒ Array<String>? (readonly)

Cc addresses

Returns:

  • (Array<String>, nil) —

    the current value of cc



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def cc
  @cc
end

#created_at ⇒ String? (readonly)

ISO 8601 timestamp

Returns:

  • (String, nil) —

    the current value of created_at



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def created_at
  @created_at
end

#delivery ⇒ InboundThreadMessageDelivery? (readonly)

Delivery outcome (outbound messages only)

Returns:



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def delivery
  @delivery
end

#direction ⇒ String (readonly)

inbound or outbound

Returns:

  • (String) —

    the current value of direction



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def direction
  @direction
end

#email_size ⇒ Integer? (readonly)

Message size in bytes

Returns:

  • (Integer, nil) —

    the current value of email_size



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def email_size
  @email_size
end

#forwards ⇒ Array<InboundForwardOutcome>? (readonly)

Forward outcomes (inbound messages only)

Returns:



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def forwards
  @forwards
end

#from ⇒ String? (readonly)

Sender address

Returns:

  • (String, nil) —

    the current value of from



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def from
  @from
end

#html_body ⇒ String? (readonly)

Decoded HTML body

Returns:

  • (String, nil) —

    the current value of html_body



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def html_body
  @html_body
end

#id ⇒ String? (readonly)

The message ID

Returns:

  • (String, nil) —

    the current value of id



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def id
  @id
end

#in_reply_to ⇒ String? (readonly)

Value of the RFC 5322 In-Reply-To header

Returns:

  • (String, nil) —

    the current value of in_reply_to



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def in_reply_to
  @in_reply_to
end

#message_group_id ⇒ String? (readonly)

Groups messages sent together as one logical send

Returns:

  • (String, nil) —

    the current value of message_group_id



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def message_group_id
  @message_group_id
end

#references ⇒ Array<String>? (readonly)

Values of the RFC 5322 References header

Returns:

  • (Array<String>, nil) —

    the current value of references



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def references
  @references
end

#reply_to ⇒ String? (readonly)

Reply-To address

Returns:

  • (String, nil) —

    the current value of reply_to



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def reply_to
  @reply_to
end

#rfc_message_id ⇒ String? (readonly)

Value of the RFC 5322 Message-ID header

Returns:

  • (String, nil) —

    the current value of rfc_message_id



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def rfc_message_id
  @rfc_message_id
end

#subject ⇒ String? (readonly)

Email subject

Returns:

  • (String, nil) —

    the current value of subject



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def subject
  @subject
end

#text_body ⇒ String? (readonly)

Decoded text body

Returns:

  • (String, nil) —

    the current value of text_body



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def text_body
  @text_body
end

#to ⇒ Array<String>? (readonly)

Recipient addresses

Returns:

  • (Array<String>, nil) —

    the current value of to



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def to
  @to
end

#visibility_status ⇒ String (readonly)

available or placeholder

Returns:

  • (String) —

    the current value of visibility_status



27
28
29
# File 'lib/mailtrap/inbound_thread_message.rb', line 27

def visibility_status
  @visibility_status
end