ASPSMARTMAIL : DOCUMENTATION
XHeaders Object
Last modified: february 1st, 2000 
© 2000 Advantys. All rights reserved.

The XHeaders collection is used for creating and reading a list of extra headers represented by a XHeader object.


Count

The Count property represents the number of XHeader objects in the collection.

Syntax
.Count

Return Value
Returns a Long value which is the number of Xheader you have added in this collection.

Examples

<%
Response.Write ("Number: " & mySmartMail.XHeaders.Count & "<BR>")
- or -
for i=1 to mySmartMail.XHeaders.Count
   Response.write mySmartMail.XHeaders.Item(i).Name & "<BR>"
next
%>

Item

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

Syntax
.Item(key)

Return Values
Returns a XHeader object of the collection corresponding to the key.

Examples

<%
for i=1 to mySmartMail.XHeaders.count then
   Response.Write("XHeader's name=" & mySmartMail.XHeaders.Item(i).Name)
end if
%>

Add

The Add method adds a new XHeader in the collection .

Syntax
.Add(Name, Value)

Parameters
The Name parameter represents the name of the header.
The Value parameter represents the value of the header.

Example

<%
mySmartMail.XHeaders.Add "X-myHeader", "Just a sample"
%>

Clear

The Clear method removes all XHeader from this collection.

Syntax
.Clear

Examples

<%
mySmartMail.XHeaders.Clear
%>

Remove

The Remove method removes an XHeader from this collection.

Syntax
.Remove(index)

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

Examples

<%
mySmartMail.XHeaders.Remove ("X-myHeader")
- or -
mySmartMail.XHeaders.Remove (1)
%>

© 2000 Advantys. All rights reserved.