Recipient (email-templates-library 1.1.0-4.9.0-160148 API)
Date: 2017-12-20

org.gcube.portal.mailing.message

## Class Recipient

- java.lang.Object
- - org.gcube.portal.mailing.message.Recipient

-     public class Recipient
      extends Object

  Represents an email recipient. The recipient contains:
  - The email address (see `EmailAddress`)
  - The recipient type (the field of the email: to, cc, bcc)
  Author:
    Massimiliano Assante, CNR-ISTI

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Recipient(EmailAddress address)` Initialize the recipient with the provided address.
    `Recipient(EmailAddress address, RecipientType type)` Initialize the recipient with the provided address and for the provided type.
    `Recipient(String address)` The address is of the form "anyuser@anyhost.anydomain" or "Name LastName <user@host.domain>".

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `EmailAddress` | `getAddress()`
    `RecipientType` | `getType()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### Recipient

          public Recipient(String address)

      The address is of the form "anyuser@anyhost.anydomain" or "Name LastName <user@host.domain>". The recipient type is set to `RecipientType.TO`.
      Parameters:
        `address` - the email address as described above

    - #### Recipient

          public Recipient(EmailAddress address)

      Initialize the recipient with the provided address. The recipient type is set to `RecipientType.TO`.
      Parameters:
        `address` - the email address

    - #### Recipient

          public Recipient(EmailAddress address,
                           RecipientType type)

      Initialize the recipient with the provided address and for the provided type.
      Parameters:
        `address` - the email address
        `type` - the recipient type see `RecipientType.TO`.

  - ### Method Detail

    - #### getAddress

          public EmailAddress getAddress()

    - #### getType

          public RecipientType getType()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2017. All Rights Reserved.