Class: Mailtrap::SandboxMessage

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

Overview

Data Transfer Object for Sandbox Message

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blacklists_report_infoBoolean (readonly)

Information about blacklists report

Returns:

  • (Boolean)

    the current value of blacklists_report_info



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def blacklists_report_info
  @blacklists_report_info
end

#created_atString (readonly)

The timestamp when the message was created

Returns:

  • (String)

    the current value of created_at



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def created_at
  @created_at
end

#download_pathString (readonly)

The path to download the email

Returns:

  • (String)

    the current value of download_path



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def download_path
  @download_path
end

#email_sizeInteger (readonly)

The size of the email in bytes

Returns:

  • (Integer)

    the current value of email_size



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def email_size
  @email_size
end

#from_emailString (readonly)

The sender’s email address

Returns:

  • (String)

    the current value of from_email



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def from_email
  @from_email
end

#from_nameString (readonly)

The sender’s name

Returns:

  • (String)

    the current value of from_name



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def from_name
  @from_name
end

#html_body_sizeInteger (readonly)

The size of the HTML body in bytes

Returns:

  • (Integer)

    the current value of html_body_size



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def html_body_size
  @html_body_size
end

#html_pathString (readonly)

The path to the HTML version of the email

Returns:

  • (String)

    the current value of html_path



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def html_path
  @html_path
end

#html_source_pathString (readonly)

The path to the HTML source of the email

Returns:

  • (String)

    the current value of html_source_path



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def html_source_path
  @html_source_path
end

#human_sizeString (readonly)

The human-readable size of the email

Returns:

  • (String)

    the current value of human_size



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def human_size
  @human_size
end

#idInteger (readonly)

The message ID

Returns:

  • (Integer)

    the current value of id



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def id
  @id
end

#inbox_idInteger (readonly)

The inbox ID

Returns:

  • (Integer)

    the current value of inbox_id



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def inbox_id
  @inbox_id
end

#is_readBoolean (readonly)

Whether the message has been read

Returns:

  • (Boolean)

    the current value of is_read



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def is_read
  @is_read
end

#raw_pathString (readonly)

The path to the raw version of the email

Returns:

  • (String)

    the current value of raw_path



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def raw_path
  @raw_path
end

#sent_atString (readonly)

The timestamp when the message was sent

Returns:

  • (String)

    the current value of sent_at



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def sent_at
  @sent_at
end

#smtp_informationHash (readonly)

Information about SMTP

Returns:

  • (Hash)

    the current value of smtp_information



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def smtp_information
  @smtp_information
end

#subjectString (readonly)

The message subject

Returns:

  • (String)

    the current value of subject



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def subject
  @subject
end

#text_body_sizeInteger (readonly)

The size of the text body in bytes

Returns:

  • (Integer)

    the current value of text_body_size



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def text_body_size
  @text_body_size
end

#to_emailString (readonly)

The recipient’s email address

Returns:

  • (String)

    the current value of to_email



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def to_email
  @to_email
end

#to_nameString (readonly)

The recipient’s name

Returns:

  • (String)

    the current value of to_name



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def to_name
  @to_name
end

#txt_pathString (readonly)

The path to the text version of the email

Returns:

  • (String)

    the current value of txt_path



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def txt_path
  @txt_path
end

#updated_atString (readonly)

The timestamp when the message was last updated

Returns:

  • (String)

    the current value of updated_at



29
30
31
# File 'lib/mailtrap/sandbox_message.rb', line 29

def updated_at
  @updated_at
end

Instance Method Details

#read?Boolean

Returns Whether the message has been read.

Returns:

  • (Boolean)

    Whether the message has been read



55
56
57
# File 'lib/mailtrap/sandbox_message.rb', line 55

def read?
  is_read
end