Sample code for 30+ languages & platforms
B4X Requires Chilkat v11.0.0+

Read To and Cc from a received message

See more Email Object Examples

Enumerate visible recipients by zero-based index. An address can have an empty display name. A delivered copy usually does not reveal recipients who were blind-copied.

Chilkat B4X Downloads

B4X
Dim success As Boolean = False

'  Assumes Chilkat is unlocked. See Global Unlock Sample.

Dim email As ChilkatEmail
email.Initialize
success = email.LoadEml("message.eml")
If success <> True Then
    Log(email.LastErrorText)
    Return
End If

Dim i As Int = 0
Do While (i < email.NumTo)
    Log("To: " & email.GetToName(i) & "  " & email.GetToAddr(i))
    i = i + 1
Loop
i = 0
Do While (i < email.NumCC)
    Log("Cc: " & email.GetCcName(i) & "  " & email.GetCcAddr(i))
    i = i + 1
Loop