Mail Headers Collection

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

Syntax

Item = Mail.Headers(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.

Remarks

The key should not contain the column character ':'

Example

In the following example, a Reply-To: header field is set on the Mail_OnStartRender event

Sub Mail_OnStartRender
    Mail.Headers("Reply-To") = """Jim Wilson"" <jim.wilson@emilltest.com>"
End Sub

In the following example, the Reply-To: header field is removed on the Mail_OnStartRender event

Sub Mail_OnStartRender
    Mail.Headers.Remove("Reply-To")
End Sub

Applies To

Mail Object



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