Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Load EML File and Display Email Headers
VB.NET Example to load a .eml file and display the email header fields. ' Load EML file and display email headers.
Dim email As New Chilkat.Email
email.UnlockComponent("anything for 30-day trial")
email.LoadEml("test.eml")
Dim i As Integer
Dim n As Integer
' Email header fields can be retrieved by name:
ListBox1.Items.Add("Subject: " + email.GetHeaderField("subject"))
' Some email header fields are associated with properties for convenience:
ListBox1.Items.Add("Subject: " + email.Subject)
' If more than one header field having the same name exists, your
' program may access them by iterating over the headers in the email
' by index:
n = email.NumHeaderFields
For i = 0 To n - 1
ListBox1.Items.Add(email.GetHeaderFieldName(i) + ": " + _
email.GetHeaderFieldValue(i))
Next
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2007 Chilkat Software, Inc. All Rights Reserved.