Compoze Software, Inc.

com.compoze.exchange
Class Recipient

java.lang.Object
  extended bycom.compoze.exchange.Recipient
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
UnresolvedRecipient

public class Recipient
extends java.lang.Object
implements java.io.Serializable

This class represents a recipient of a message. Recipients are either constructed with a name, a display name and address, or with an address entry ID.

See Also:
Serialized Form

Field Summary
static int FLAG_RICH_TEXT
          Flag that says that the recipient is capable of receiving rich text emails.
 
Constructor Summary
Recipient(RecipientType type, java.lang.String sAddressEntryID)
          Constructor.
Recipient(RecipientType type, java.lang.String sAddress, java.lang.String sName)
          Constructor.
Recipient(RecipientType type, java.lang.String sAddress, java.lang.String sName, int iFlags)
          Constructor.
 
Method Summary
 java.lang.String getAddress()
          Gets the address of the recipient.
 java.lang.String getAddressEntryID()
          Gets the address entry ID.
 java.lang.String getName()
          Gets the name of the recipient.
 RecipientType getRecipientType()
          Gets the recipient type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLAG_RICH_TEXT

public static final int FLAG_RICH_TEXT
Flag that says that the recipient is capable of receiving rich text emails. If this flag is used, you will want to be sure that the recipient is either running Exchange or has a mail system that is capable of dealing with MS/TNEF emails. Otherwise, the recipient will see an attachment called winmail.dat which will not be useful to them and they won't be able to receive any of the other attachments.

See Also:
Constant Field Values
Constructor Detail

Recipient

public Recipient(RecipientType type,
                 java.lang.String sAddress,
                 java.lang.String sName)
Constructor. Set the address to null and use only the name to resolve addresses. Make sure you resolve the recipients before sending the message if this is the case.

Parameters:
type - the recipient type (must not be null)
sAddress - the recipient address (must not be null if display name is null, example: SMTP:support@compoze.com, if no prefix is used SMTP: is prepended automatically)
sName - the recipient display name (if null, email address is used as display name)

Recipient

public Recipient(RecipientType type,
                 java.lang.String sAddress,
                 java.lang.String sName,
                 int iFlags)
Constructor. Set the address to null and use only the name to resolve addresses. Make sure you resolve the recipients before sending the message if this is the case.

Parameters:
type - the recipient type (must not be null)
sAddress - the recipient address (must not be null if display name is null, example: SMTP:support@compoze.com, if no prefix is used SMTP: is prepended automatically)
sName - the recipient display name (if null, email address is used as display name)
iFlags - logical or of the FLAG_ constants

Recipient

public Recipient(RecipientType type,
                 java.lang.String sAddressEntryID)
Constructor.

Parameters:
type - the recipient type
sAddressEntryID - an address entry ID
Method Detail

getName

public java.lang.String getName()
Gets the name of the recipient.

Returns:
the name

getAddress

public java.lang.String getAddress()
Gets the address of the recipient.

Returns:
the address

getRecipientType

public RecipientType getRecipientType()
Gets the recipient type.


getAddressEntryID

public java.lang.String getAddressEntryID()
Gets the address entry ID.


Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.