Package com.independentsoft.email.mime

# Class Mailbox

java.lang.Object
com.independentsoft.email.mime.Mailbox

public class Mailbox extends Object
Represents a mailbox.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Mailbox()`
  Initializes a new instance of the Mailbox.
  `Mailbox​(String mailbox)`
  Initializes a new instance of the Mailbox.
  `Mailbox​(String emailAddress, String name)`
  Initializes a new instance of the Mailbox.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getEmailAddress()`
  Gets email address.
  `String`
  `getName()`
  Gets display name.
  `void`
  `setEmailAddress​(String emailAddress)`
  Sets email address.
  `void`
  `setName​(String name)`
  Sets display name.
  `String`
  `toString()`
  Returns a String that represents the current Mailbox.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Mailbox

    public Mailbox()
    Initializes a new instance of the Mailbox.

  - ### Mailbox

    public Mailbox​(String emailAddress, String name)
    Initializes a new instance of the Mailbox.
    Parameters:
      `emailAddress` - Email address of mailbox owner.
      `name` - Name of mailbox owner.

  - ### Mailbox

    public Mailbox​(String mailbox)
    Initializes a new instance of the Mailbox.
    Parameters:
      `mailbox` - Email address and name of mailbox owner.

- ## Method Details

  - ### toString

    public String toString()
    Returns a String that represents the current Mailbox.
    Overrides:
      `toString` in class `Object`
    Returns:
      A String that represents the current Mailbox.

  - ### getName

    public String getName()
    Gets display name.
    Returns:
      The display name.

  - ### setName

    public void setName​(String name)
    Sets display name.
    Parameters:
      `name` - The display name.

  - ### getEmailAddress

    public String getEmailAddress()
    Gets email address.
    Returns:
      The email address.

  - ### setEmailAddress

    public void setEmailAddress​(String emailAddress)
    Sets email address.
    Parameters:
      `emailAddress` - The email address.