Mail Tos Collection

The Mail.Tos collection contains the list of receivers displayed in the To: field of an email message. The collection can be used to determine the value of a specific To item, or to iterate through the collection and retrieve a list of all To receivers. See the Collection Object for standard collection properties and methods.

Syntax

Item = Mail.Tos(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 Tos collection contains the list of email address that will be displayed in the To: field of an email message, where as the Receivers collection contains the list of receivers that will actually receive the message.

Example

The following example sets the To: field as "<Undisclosed Recipients>"

Sub Mail_OnStartRender
    Mail.Tos.RemoveAll
    Mail.Tos.Add "<Undisclosed Recipients>"
End Sub

The following example returns all items in Tos collection separated by commas.

Response.Write Mail.Tos

Applies To

Mail Object

See Also

Receivers, CCs, Collection Object



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