:GetFirstMessageHeader()
Class
Syntax
:GetFirstMessageHeader( [hMessage] ) -> aHeader
Parameters
|
|
hMessage |
Optional. Handle of the message to act on. Provided during :CreateMessage() operation |
Return
Returns a two element array containing the Header (aHeader[1]) and Value (aHeader[2]).
Description
The :GetFirstMessageHeader() method returns the header field name and value for the first header in the current message part. This function is typically used in conjunction with :GetNextMessageHeader() to enumerate all of the message header fields and their values in the current message part.
Each part in a multipart message has one or more header fields. To obtain header values for the main message, rather than the message attachments, the current part number must be set to zero using the :SetMessagePart() method.
The header fields from an imported message may not be returned in the same order as which they appear in the message. An application should never make an assumption about the order in which one or more header fields are defined.
See Also
:EnumMessageHeaders(), :GetMessagePart(), :GetNextMessageHeader(), :ParseHeader(), :SetMessageHeader(), :SetMessagePart()