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

Create an inline forward

See more Email Object Examples

Create a forward from a saved email, set the forwarding author and destination, and inspect the generated subject and body. Save the draft before submitting it to SMTP. To introduce the original with a separate cover note, use the attached-message example.

Chilkat VB.NET Downloads

VB.NET
Dim success As Boolean = False

'  Assumes Chilkat is unlocked. See Global Unlock Sample.

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

Dim forward As New Chilkat.Email
success = original.ToForward(forward)
If (success <> True) Then
    Debug.WriteLine(original.LastErrorText)
    Exit Sub
End If

forward.From = "Workshop team <events@example.com>"
success = forward.AddTo("Coordinator","coordinator@example.net")
If (success <> True) Then
    Debug.WriteLine(forward.LastErrorText)
    Exit Sub
End If

Debug.WriteLine(forward.Subject)
If (forward.HasHtmlBody() = True) Then
    Debug.WriteLine(forward.GetHtmlBody())
Else
    Debug.WriteLine(forward.GetPlainTextBody())
End If


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

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