Catalyst Internet Mail .NET

InternetMail.GetFirstHeader Method 

Return the first header in the current message part.

[Visual Basic]
Public Function GetFirstHeader( _
   ByRef headerName As String, _
   ByRef headerValue As String _
) As Boolean
[C#]
public bool GetFirstHeader(
   ref string headerName,
   ref string headerValue
);

Parameters

headerName
A string passed by reference which will contain the name of the first header field when the method returns.
headerValue
A string passed by reference which will contain the value of the first header field when the method returns.

Return Value

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.

Remarks

The GetFirstHeader method allows an application to enumerate all of the headers in the current message part. If the current message part does not contain any header fields, this method will return false.

The current message part is returned by the Part property.

See Also

InternetMail Class | SocketTools Namespace