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.
Item = Mail.Headers(key|index)
Returns a variant.
The key should not contain the column character ':'
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