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.
Item = Mail.Tos(key|index)
Returns a Variant of type String.
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.
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
Receivers, CCs, Collection Object