Each mail server that relays a message while an email is in transit will add a "Recieved" header field. When an email is delivered to its final destination, it may contain multiple "Received" header fields. This VB6 example demonstrates how to iterate over the Received headers and parse the dates.
It uses the CkString ActiveX, which is a freeware string utility ActiveX downloadable at http://www.chilkatsoft.com/download/ckString.zip
Dim email As New ChilkatEmail2
' First, load an email. This example loads an email from
' a file.
Dim success As Long
success = email.LoadEml("testReceivedHdrs.eml")
If (success <> 1) Then
MsgBox email.LastErrorText
Exit Sub
End If
Dim n As Long
n = email.NumHeaderFields()
' List the Received header fields:
Dim i As Long
Dim name As String
Dim value As String
Dim strUtil As New CkString
Dim d As Date
For i = 0 To n - 1
name = email.GetHeaderFieldName(i)
If (StrComp("received", name, vbTextCompare) = 0) Then
value = email.GetHeaderFieldValue(i)
idx = InStrRev(value, ";")
If (idx >= 0) Then
idx = idx + 1
value = Mid$(value, idx)
strUtil.Str = value
d = strUtil.ParseDateRfc822
Text1.Text = Text1.Text & d & vbCrLf
End If
End If
Next