MimeSetMessageHeader Function  
 
BOOL WINAPI MimeSetMessageHeader(
  HMESSAGE hMessage,  
  LPCTSTR lpszHeader,  
  LPCTSTR lpszValue  
);

The MimeSetMessageHeader function adds or updates a header field in the specified message.

Parameters

hMessage
Handle to the message.
lpszHeader
Pointer to a null-terminated string which specifies the header field that will be added or updated.
lpszValue
Pointer to a null-terminated string which specifies the value for the header field. This pointer may be NULL, which causes the header field to be removed from the message.

Return Value

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

Requirements

Client: Requires Windows 7, Windows Vista or Windows XP.
Server: Requires Windows Server 2008 or Windows Server 2003.
Header: Include cstools7.h.
Library: Use csmsgav7.lib.
Unicode: Implemented as Unicode and ANSI versions.

See Also

MimeEnumMessageHeaders, MimeGetFirstMessageHeader, MimeGetMessageHeader, MimeGetMessagePart, MimeGetNextMessageHeader, MimeSetMessagePart, MimeSetMessageText