Mail Receivers Collection

The Mail.Receivers collection contains all message receivers. The collection can be used to determine the value of a specific receiver item, or to iterate through the collection and retrieve a list of all receivers. See the Collection Object for standard collection properties and methods.

Syntax

Item = Mail.Receivers(key|index)

Parameters
key
The identifier for the item to return.
index
An index offset indicating which item in the list to return. The index starts at 0
Return Value

Returns a Variant of type String

Remarks

The Receivers collection contains the list of email address that will actually receive the mail message, whereas the Tos and CCs collection contains the list of receivers displayed in the mail message.

Example

In the following example, a receiver is added on the Mail_OnStartRender event

Sub Mail_OnStartRender
    Mail.Receivers.Add "TheBoss","bigboss@emilltest.com"
    Mail.CCs.Add "TheBoss","bigboss@emilltest.com"
End Sub

Applies To

Mail Object

See Also

Tos, CCs, Collection Object



©2001-2015 eMill. All trademarks property of their owners.