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. This parameter must be passed by reference.
Return Value
A boolean value of True is returned if the method succeeds,
otherwise a value of False is returned. For more information about the
cause of the failure, check the value of the LastError property.
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 HeaderValue
parameter 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
|