123456789_123456789_123456789_123456789_123456789_

Class: Net::IMAP::Envelope

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
  • Object
Defined in: lib/net/imap/response_data.rb

Overview

Envelope represents envelope structures of messages.

[Note] When the #sender and #reply_to fields are absent or empty, they will return the same value as #from. Also, fields may return values that are invalid for well-formed [RFC5322] messages when the message is malformed or a draft message.

See [IMAP4rev1 §7.4.2] and [IMAP4rev2 §7.5.2] for full description of the envelope fields, and Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs.

Returned by FetchData#envelope

Instance Attribute Summary

Instance Attribute Details

#bccarray of Net::IMAP::Address (rw)

Returns an array of Address that represents the Bcc header.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 643

class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
:to, :cc, :bcc, :in_reply_to, :message_id)

#ccarray of Net::IMAP::Address (rw)

Returns an array of Address that represents the Cc header.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 643

class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
:to, :cc, :bcc, :in_reply_to, :message_id)

#dateString (rw)

Returns a string that represents the Date header.

[Note] For a well-formed [RFC5322] message, the #date field must not be nil. However it can be nil for a malformed or draft message.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 643

class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
:to, :cc, :bcc, :in_reply_to, :message_id)

#fromarray of {Net::IMAP::Address}? (rw)

Returns an array of Address that represents the From header.

If the From header is absent, or is present but empty, the server returns nil for this envelope field.

[Note] For a well-formed [RFC5322] message, the #from field must not be nil. However it can be nil for a malformed or draft message.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 643

class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
:to, :cc, :bcc, :in_reply_to, :message_id)

#in_reply_toString (rw)

Returns a string that represents the In-Reply-To header.

[Note] For a well-formed [RFC5322] message, the #in_reply_to field, if present, must not be empty. But it can still return an empty string for malformed messages.

Servers should return {nil} when the header is absent and an empty
string when it is present but empty.  Some servers may return a {nil}
envelope member in the "present but empty" case.  Clients should treat
{nil} and empty string as identical.
[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 643

class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
:to, :cc, :bcc, :in_reply_to, :message_id)

#message_idString (rw)

Returns a string that represents the Message-ID.

[Note] For a well-formed [RFC5322] message, the #message_id field, if present, must not be empty. But it can still return an empty string for malformed messages.

Servers should return {nil} when the header is absent and an empty
string when it is present but empty.  Some servers may return a {nil}
envelope member in the "present but empty" case.  Clients should treat
{nil} and empty string as identical.
[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 643

class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
:to, :cc, :bcc, :in_reply_to, :message_id)

#reply_toarray of {Net::IMAP::Address}? (rw)

Returns an array of Address that represents the Reply-To header.

[Note] If the Reply-To header is absent, or is present but empty, the server sets this field to be the same value as #from. Therefore, in a well-formed [RFC5322] message, the #reply_to envelope field must not be nil. However it can be nil for a malformed or draft message.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 643

class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
:to, :cc, :bcc, :in_reply_to, :message_id)

#senderarray of {Net::IMAP::Address}? (rw)

Returns an array of Address that represents the Sender header.

[Note] If the Sender header is absent, or is present but empty, the server sets this field to be the same value as #from. Therefore, in a well-formed [RFC5322] message, the #sender envelope field must not be nil. However it can be nil for a malformed or draft message.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 643

class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
:to, :cc, :bcc, :in_reply_to, :message_id)

#subjectString? (rw)

Returns a string that represents the Subject header, if it is present.

[Note] Servers should return nil when the header is absent and an empty string when it is present but empty. Some servers may return a nil envelope member in the "present but empty" case. Clients should treat nil and empty string as identical.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 643

class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
:to, :cc, :bcc, :in_reply_to, :message_id)

#toarray of Net::IMAP::Address (rw)

Returns an array of Address that represents the To header.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 643

class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
:to, :cc, :bcc, :in_reply_to, :message_id)