SetHeader Method  
 

Set the value for the specified header in the current message part.

Syntax

object.SetHeader( HeaderField, HeaderValue )

Parameters

HeaderField
A string which specifies the name of the header field to create or modify. If the header field does not exist, then it will be created. If the header field exists, the current value will be overwritten.
HeaderValue
A string which specifies the value of the specified header field.

Return Value

A value of zero is returned if the method succeeds. Otherwise, a non-zero error code is returned which indicates the cause of the failure.

See Also

AllHeaders Property, Part Property, GetFirstHeader Method, GetHeader Method, GetNextHeader Method