Recipient

Describes the recipient of a message.

Properties

The following table lists properties along with their access and descriptions.

Property

Access

Description

Address

R/O

Address. The address this recipient resolved to. Can be Nothing if this recipient is unresolved or resolved as an external address.

Application

R/O

Application. The Application object.

DisplayName

R/W

String. A descriptive name to display to users.

EmailAddress

R/W

DEFAULT. String. The email address used by the system to deliver mail. The format is determined by the EmailType property.

EmailType

R/W

String. The type of email address. If you want GroupWise to transport email, you must use the NGW type to add any type of recipient. Non-GroupWise addresses are submitted to the operating system’s default email transport. (In Windows, for example, the transport would be MAPI.)

For examples of how to call Mail.Recipients.Add, see the Remarks section of Recipients.

Parent

R/O

Recipients collection. The Recipients collection that owns this object.

RecipientStatusList

R/O

RecipientStatusList collection object.

Resolved

R/W

Enum (ResolvedConstants). Indicates the resolved status of this recipient. Automatically set to egwNotResolved when the DisplayName, EmailAddress, EmailType, or TargetType properties are changed. Can be manually set only to egwNotResolved. This property is not persistent. It will revert to egwNotResolved whenever the Recipient object is refreshed or freed from memory.

TargetType

R/W

Enum (AddressTargetTypeConstants). Indicates whether or not this recipient is a primary recipient, carbon copy recipient, or blind copy recipient.

Methods

Delete()

Removes this recipient from the owning Recipients collection and deletes the Recipient object.

Resolve([AddressBook ResolveTo])

Resolves this recipient. See Remarks for more information.

Remarks

A Recipient object differs from an Address object in that it originates from an arbitrary address and has a TargetType and a Resolve method. In contrast, an Address object originates from a resolved address and does not have a TargetType or a Resolve method.

A Recipient object is refreshed when its parent object is refreshed. When a Recipient object is refreshed, it recursively refreshes its Address object.

The Resolve method behaves in the following manner:

  • If the Recipient is already resolved (its Resolved property is TRUE), the Resolve operation is considered successful.

  • Otherwise, when attempting to locate the indicated address, three address books are searched in the following order: (a) Frequent Contacts personal address book; (b) default address book; (c) system address book. This is the same search order used by the Name Completion Control when looking up names in the GroupWise client.

  • If an entry is found that matches the Recipient fields indicated by the caller, a new Address property is created for the Recipient and its values are copied from the found address book entry. The Resolve operation is considered successful.

  • If the recipient is not found in an address book and its EmailType is external (such as an Internet address), the Recipients Address property is set to a new Address object with ObjType = egwUser and DisplayName, EmailAddress, and EmailType the same as the Recipient's properties, the Resolve operation is considered successful.

  • If the recipient is not found in an address book and its EmailType is internal (such as a GroupWise address), the Resolve operation throws an exception.