HeaderItem.HeaderValue Property


Gets or sets the value of the header.

[Visual Basic]
Public Property HeaderValue As String
[C#]
public string HeaderValue {get; set;}
[C++]
public: __property String^ get_HeaderValue();
public: __property void set_HeaderValue(String^);
[JScript]
public function get HeaderValue() : String;
public function set HeaderValue(String);

Property Value

A String value indicating the value of the HeaderItem.

Example

[Visual Basic, C#, C++] To get the full samples of EAGetMail, please refer to Samples section.

[Visual Basic - Parse Headers]
Imports EAGetMail
Public Sub ParseHeaders()
    Dim oMail As New Mail("TryIt")
    oMail.Load("c:\test.eml", False)
    Dim oHeaders As HeaderCollection = oMail.Headers
    Dim count As Integer = oHeaders.Count
    For i As Integer = 0 To count - 1
        Dim oHeader As HeaderItem = oHeaders(i)
        Console.WriteLine("{0}: {1}", oHeader.HeaderKey, oHeader.HeaderValue)
    Next
End Sub


[C# - Parse Headers] using System; using EAGetMail; public static void ParseHeaders() { Mail oMail = new Mail("TryIt"); oMail.Load("c:\\test.eml", false); HeaderCollection oHeaders = oMail.Headers; int count = oHeaders.Count; for(int i = 0; i < count; i++) { HeaderItem oHeader = oHeaders[i] as HeaderItem; Console.WriteLine("{0}: {1}", oHeader.HeaderKey, oHeader.HeaderValue); } }
[C++/CLI - Parse Headers] using namespace System; using namespace EAGetMail; Void ParseHeaders() { Mail ^oMail = gcnew Mail("TryIt"); oMail->Load("c:\\test.eml", false); HeaderCollection ^oHeaders = oMail->Headers; int count = oHeaders->Count; for(int i = 0; i < count; i++) { HeaderItem ^oHeader = dynamic_cast<HeaderItem^>(oHeaders->Item[i]); Console::WriteLine("{0}: {1}", oHeader->HeaderKey, oHeader->HeaderValue); } }

See Also

Mail.Headers Property

Online Tutorials

Parse Email in C#
Parse Email in VB
Parse Email in C++/CLI