class Net::IMAP::Envelope
Net::IMAP::Envelope
represents envelope structures of messages.
- Note
-
When the
sender
andreply_to
fields are absent or empty, they will return the same value asfrom
. 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 Message envelope and body structure at Net::IMAP
for other relevant RFCs.
Returned by FetchData#envelope
Public Instance Methods
Returns an array of Address
that represents the Bcc
header.
# File net-imap-0.4.11/lib/net/imap/response_data.rb, line 653
Returns an array of Address
that represents the Cc
header.
# File net-imap-0.4.11/lib/net/imap/response_data.rb, line 647
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 benil
. However it can benil
for a malformed or draft message.
# File net-imap-0.4.11/lib/net/imap/response_data.rb, line 600
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 anil
envelope member in the “present but empty” case. Clients should treatnil
and empty string as identical.
# File net-imap-0.4.11/lib/net/imap/response_data.rb, line 659
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 anil
envelope member in the “present but empty” case. Clients should treatnil
and empty string as identical.
# File net-imap-0.4.11/lib/net/imap/response_data.rb, line 675
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 asfrom
. Therefore, in a well-formed [RFC5322] message, thereply_to
envelope field must not benil
. However it can benil
for a malformed or draft message.
# File net-imap-0.4.11/lib/net/imap/response_data.rb, line 627
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 asfrom
. Therefore, in a well-formed [RFC5322] message, thesender
envelope field must not benil
. However it can benil
for a malformed or draft message.
# File net-imap-0.4.11/lib/net/imap/response_data.rb, line 614
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 anil
envelope member in the “present but empty” case. Clients should treatnil
and empty string as identical.
# File net-imap-0.4.11/lib/net/imap/response_data.rb, line 588
Returns an array of Address
that represents the To
header.
# File net-imap-0.4.11/lib/net/imap/response_data.rb, line 641