CMailMessage::ParseHeader Method  
 
BOOL ParseHeader(
  LPCTSTR lpszHeader  
);

The ParseHeader method parses a line of text and adds the header and value to the current message.

Parameters

lpszHeader
Pointer to a string which contains the header and value to be added to the message.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

This method is used to parse a line of text that is part of a message header. The string must consist of a header name, followed by a colon, followed by the header value. The header name may only consist of printable characters, and may not contain whitespace (space, tab, carriage return or linefeed characters).

In most cases, it is recommended you use the SetHeader method to set the value of a header.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csmsgv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also