B4X Requires Chilkat v11.0.0+
B4X
Read the recipient results in a delivery status report
See more Email Object Examples
Check the report type before reading DSN-specific fields. One report may describe multiple recipients. Retain the per-recipient information in GetDsnInfo instead of assigning one status to every delivery.
Chilkat B4X Downloads
Dim success As Boolean = False
' Assumes Chilkat is unlocked. See Global Unlock Sample.
Dim email As ChilkatEmail
email.Initialize
success = email.LoadEml("delivery-status.eml")
If success <> True Then
Log(email.LastErrorText)
Return
End If
If email.IsMultipartReport <> True Then
Log("This message is not a multipart report.")
Return
End If
If email.GetNumPartsOfType("message/delivery-status", False, False) = 0 Then
Log("No delivery-status part in this report.")
Return
End If
If email.HasPlainTextBody = True Then
Log(email.GetPlainTextBody)
End If
Dim details As ChilkatJsonObject
details.Initialize
success = email.GetDsnInfo(details)
If success <> True Then
Log(email.LastErrorText)
Return
End If
details.EmitCompact = False
Log(details.Emit)