123456789_123456789_123456789_123456789_123456789_

Class: Net::IMAP::Address

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

Address represents an electronic mail address, which has been parsed into its component parts by the server. Address objects are returned within Envelope fields.

Group syntax

When the #host field is nil, this is a special form of address structure that indicates the [RFC5322] group syntax. If the #mailbox name field is also nil, this is an end-of-group marker (semicolon in RFC-822 syntax). If the #mailbox name field is non-+NIL+, this is the start of a group marker, and the mailbox #name field holds the group name phrase.

Instance Attribute Summary

Instance Attribute Details

#hostString? (rw)

Returns the [RFC5322] addr-spec domain name.

nil indicates [RFC5322] group syntax.

[ GitHub ]

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

class Address < Struct.new(:name, :route, :mailbox, :host)

#mailboxString? (rw)

Returns the [RFC5322] address local-part, if #host is not nil.

When #host is nil, this returns an [RFC5322] group name and a nil mailbox indicates the end of a group.

[ GitHub ]

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

class Address < Struct.new(:name, :route, :mailbox, :host)

#nameString? (rw)

Returns the [RFC5322] address display-name (or the mailbox phrase in the RFC-822 grammar).

[ GitHub ]

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

class Address < Struct.new(:name, :route, :mailbox, :host)

#routeString? (rw)

Returns the route from RFC-822 route-addr.

Note

Generating this obsolete route addressing syntax is not allowed by [RFC5322]. However, addresses with this syntax must still be accepted and parsed.

[ GitHub ]

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

class Address < Struct.new(:name, :route, :mailbox, :host)