GetHeader Method  
 

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

Syntax

object.GetHeader( HeaderField, HeaderValue )

Parameters

HeaderField
A string variable which will specifies the name of the header field to return the value of. Header field names are not case sensitive.
HeaderValue
A string variable which will contain the value of the specified header field.

Return Value

A value of True is returned if the header value was returned. If the current message part does not contain the specified header field, this method will return False.

Parameters

The GetHeader method is used to retrieve the value for a specific header in the current message part. 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

AllHeaders Property, Part Property, GetFirstHeader Method, GetNextHeader Method, SetHeader Method