|
|
| INT
PopGetHeaderValue(
|
|
|
HCLIENT
hClient, |
|
|
|
|
UINT
nMessageId, |
|
|
|
|
LPCTSTR
lpszHeader, |
|
|
|
|
LPTSTR
lpszValue, |
|
|
|
|
INT nMaxLength |
|
|
| );
|
The PopGetHeaderValue function returns the value of a
header field in the specified message.
Parameters
- hClient
- Handle to the client session.
- nMessageId
- Number of message to retrieve header value from. This value
must be greater than zero. The first message in the mailbox is
message number one.
- lpszHeader
- Pointer to a null-terminated string which specifies the message
header to retrieve. The colon should not be included in this
string.
- lpszValue
- Pointer to a string buffer that will contain the value of the
specified message header.
- nMaxLength
- The maximum number of characters that may be copied into the
buffer, including the terminating null-byte.
Return Value
If the function succeeds, the function returns the length of the
header field value. If the header field is not present in the
message, the function will return a value of zero. If the function
fails, the return value is POP_ERROR. To get extended error
information, call PopGetLastError.
Remarks
The PopGetHeaderValue function returns the value of a
header field from the specified message. This allows an application
to be able to easily determine the value of a header (such as the
sender, or the subject of the message) without downloading the
entire header block or contents of the message.
This function uses the XTND XLST command, which is an extension
to the POP3 protocol. Not all servers support the use of this
command. If the command is not supported, the function will return
an error. For compatibility with most mail servers, it is
recommended that you use the PopGetMessageHeaders function
to retrieve all of the headers for the specified message, and then
parse the result for the particular header field that you are
interested in.
Requirements
Client: Requires Windows Vista, Windows XP or Windows
2000 Professional.
Server: Requires Windows Server 2008, Windows Server 2003 or
Windows 2000 Server.
Header: Include cstools6.h.
Library: Use cspopav6.lib.
Unicode: Implemented as Unicode and ANSI versions.
See Also
PopGetMessageHeaders,
PopGetMessageId, PopGetMessageSender
|
|