Return the value of a header field in the specified message part.
This method returns a Boolean value. If the method succeeds, the return value is true. If the method fails, the return value is false. To get extended error information, check the value of the LastError property.
The GetHeader method is used to retrieve the value for a specific header in the specified message part. If the header field exists, the method will return true and the headerValue argument will contain the header value. If the header does not exist, the method will return false.
If there are multiple headers with the same name, the first value will be returned. To enumerate all of the headers in a message, including duplicate header fields, use the GetFirstHeader and GetNextHeader methods.
MailMessage Class | SocketTools Namespace | MailMessage.GetHeader Overload List | AddHeaders Method | SetHeader Method