GetHeader Method

Return the value for the specified header in the current message part.

Syntax

object.GetHeader( Header, Value )

The GetHeader method syntax has the following parts:

Part Description
object An object expression that evaluates to an InternetMail object.
header A string which specifies the name of the header field.
value A string which will contain the value of the header field.

Return Type

Boolean

Remarks

The GetHeader method is used to retrieve the value for a specific header in the current message part. If the header field exists, the method will return True and the value argument will contain the header value. If the header does not exist, the method will return False.

If there are multiple headers with the same name, the first value will be returned. To enumerate all of the headers in a message, including duplicate header fields, use the GetFirstHeader and GetNextHeader methods.

See Also

MessagePart Property, GetFirstHeader Method, GetNextHeader Method, SetHeader Method


Copyright © 2008 Catalyst Development Corporation. All rights reserved.