:GetNextMessageHeader()
Class
Syntax
:GetNextMessageHeader( [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 :GetNextMessageHeader() method returns the header field name and value for the next header in the current message part. This function is typically used in conjunction with :GetFirstMessageHeader() 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 function().
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, with the following exception:
If an imported message has multiple Received headers, then those headers will be returned by :GetNextMessageHeader() in the order in which they appeared in the original message.
Note that if :GetMessageHeader() is used to retrieve the Received header, the first Received header in the message will be returned.
See Also
:EnumMessageHeaders(), :GetMessagePart(), :GetFirstMessageHeader(), :ParseHeader(), :SetMessageHeader(), :SetMessagePart()