Class OutlookMessageRecipient

java.lang.Object
ch.astorm.jotlmsg.OutlookMessageRecipient

public class OutlookMessageRecipient extends Object
Represents a recipient.
Author:
Cedric Tabin
  • Constructor Details

    • OutlookMessageRecipient

      public OutlookMessageRecipient(OutlookMessageRecipient.Type type, String email)
      Creates a new OutlookMessageRecipient with the given type and email and a null name.
      Parameters:
      type - The type.
      email - The email or null.
    • OutlookMessageRecipient

      public OutlookMessageRecipient(OutlookMessageRecipient.Type type, String email, String name)
      Creates a new OutlookMessageRecipient with the specified parameters.
      Parameters:
      type - The type.
      email - The email or null.
      name - The name or null.
  • Method Details

    • getType

      public final OutlookMessageRecipient.Type getType()
      Returns the type of recipient.
      Returns:
      The type of recipient.
    • getName

      public String getName()
      Defines the name of the recipient. This value may be null.
    • setName

      public void setName(String name)
    • getEmail

      public String getEmail()
      Defines the email of the recipient. This value may be null.
    • setEmail

      public void setEmail(String email)
    • getAddress

      public jakarta.mail.Address getAddress() throws jakarta.mail.internet.AddressException
      Returns a new Address from the email of this recipient. If the email is not defined, this method returns null.
      Returns:
      A new InternetAddress.
      Throws:
      jakarta.mail.internet.AddressException - If the email is not valid.