ASPSMARTMAIL : DOCUMENTATION
Recipients, CCs, BCCs, ReplyTos Objects
Last modified: february 1st, 2000 
© 2000 Advantys. All rights reserved.

The Recipients, CCs, BCCs and ReplyTos collections are used for creating and reading lists of email address represented by the Recipient, CC, BCC and ReplyTo objects.


Count

The Count property represents the number of Recipient, CC, BCC or ReplyTo objects in the collection.

Syntax
.Count

Return Value
Returns a Long value which is the number of Recipient, CC, BCC or ReplyTo you have added in the corresponding collection.

Examples

<%
Response.Write "aspSmartMail send the email to " & mySmartMail.Recipients.Count & " persons."
Response.Write "including " & mySmartMail.CCs.Count & " carbon copy."
Response.Write "and " & mySmartMail.BCCs.Count & " blind carbon copy."
- or -
for i=1 to mySmartMail.ReplyTos.Count
   Response.write mySmartMail.ReplyTos.Item(i).Name & "<BR>"
next
%>

Item

The Item property access to an item of the collection. This is the default method of the collection object.

Syntax
.Item(key)

Return Values
Returns a Recipient, CC, BCC or ReplyTo object of the collection corresponding to the key.

Examples

<%
for i=1 to mySmartMail.Recipients.count
   Response.Write("To :" & mySmartMail.Recipients.Item(i).Name)
next
%>

Add

The Add method adds a new person in the corresponding collection (Recipient, CC, BCC or ReplyTo).

Syntax
.Add(Address[, Name])

Parameters
The Address parameter represents the email address of the person.
The Name parameter is optional and represents the name of the person.

Example

<%
mySmartMail.Recipients.Add "john.doe@domain.com", "John DOE"
mySmartMail.Recipients.Add "john.smith@domain.com"

mySmartMail.CCs.Add "john.doe@domain.com", "John DOE"

%>

Clear

The Clear method removes all entries from the corresponding collection (Recipient, CC, BCC or ReplyTo).

Syntax
.Clear

Examples

<%
mySmartMail.CCs.Clear
mySmartMail.BCCs.Clear
mySmartMail.ReplyTos.Clear
%>

Remove

The Remove method removes an entry from a collection.

Syntax
.Remove(index)

Parameters
Index is a variant value.
It could be a string expression representing the email address of person to remove.
It could be a numeric expression representing the position within the collection of the person to remove.

Examples

<%
mySmartMail.Recipients.Remove ("john.smith@domain.com")
- or -
mySmartMail.Recipients.Remove (2)
%>

© 2000 Advantys. All rights reserved.