Package ch.astorm.jotlmsg
Class OutlookMessageRecipient
- java.lang.Object
-
- ch.astorm.jotlmsg.OutlookMessageRecipient
-
public class OutlookMessageRecipient extends java.lang.ObjectRepresents a recipient.- Author:
- Cedric Tabin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOutlookMessageRecipient.TypeRepresents the type of recipient.
-
Constructor Summary
Constructors Constructor Description OutlookMessageRecipient(OutlookMessageRecipient.Type type, java.lang.String email)Creates a newOutlookMessageRecipientwith the giventypeandemailand a null name.OutlookMessageRecipient(OutlookMessageRecipient.Type type, java.lang.String email, java.lang.String name)Creates a newOutlookMessageRecipientwith the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.mail.AddressgetAddress()Returns a newAddressfrom the email of this recipient.java.lang.StringgetEmail()Defines the email of the recipient.java.lang.StringgetName()Defines the name of the recipient.OutlookMessageRecipient.TypegetType()Returns the type of recipient.voidsetEmail(java.lang.String email)voidsetName(java.lang.String name)
-
-
-
Constructor Detail
-
OutlookMessageRecipient
public OutlookMessageRecipient(OutlookMessageRecipient.Type type, java.lang.String email)
Creates a newOutlookMessageRecipientwith the giventypeandemailand a null name.- Parameters:
type- The type.email- The email or null.
-
OutlookMessageRecipient
public OutlookMessageRecipient(OutlookMessageRecipient.Type type, java.lang.String email, java.lang.String name)
Creates a newOutlookMessageRecipientwith the specified parameters.- Parameters:
type- The type.email- The email or null.name- The name or null.
-
-
Method Detail
-
getType
public final OutlookMessageRecipient.Type getType()
Returns the type of recipient.- Returns:
- The type of recipient.
-
getName
public java.lang.String getName()
Defines the name of the recipient. This value may be null.
-
setName
public void setName(java.lang.String name)
-
getEmail
public java.lang.String getEmail()
Defines the email of the recipient. This value may be null.
-
setEmail
public void setEmail(java.lang.String email)
-
getAddress
public jakarta.mail.Address getAddress() throws jakarta.mail.internet.AddressExceptionReturns a newAddressfrom 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.
-
-