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

Create a message disposition notification

See more Email Object Examples

An MDN describes a recipient-side event such as displaying a message. Create one only when the application has an appropriate request and the recipient has consented. Set Final-Recipient from the actual receiving mailbox. MDN format.

Chilkat VB.NET Downloads

VB.NET
Dim success As Boolean = False

'  Assumes Chilkat is unlocked. See Global Unlock Sample.

Dim email As New Chilkat.Email
success = email.LoadEml("message.eml")
If (success <> True) Then
    Debug.WriteLine(email.LastErrorText)
    Exit Sub
End If

Dim fields As New Chilkat.Xml
fields.Tag = "DispositionFields"
fields.NewChild2("Final-Recipient","rfc822; alex@example.net")
Dim originalId As String = email.GetHeaderField("Message-ID")
If (originalId <> "") Then
    fields.NewChild2("Original-Message-ID",originalId)
End If

fields.NewChild2("Disposition","manual-action/MDN-sent-manually; displayed")
Dim report As New Chilkat.Email
success = email.ToMdn("The recipient displayed your message.",fields.GetXml(),True,report)
If (success <> True) Then
    Debug.WriteLine(email.LastErrorText)
    Exit Sub
End If

report.From = "Alex Rivera <alex@example.net>"

success = report.SaveEml("disposition.eml")
If (success <> True) Then
    Debug.WriteLine(report.LastErrorText)
    Exit Sub
End If

Debug.WriteLine("Saved disposition.eml.")