Visual Basic 6.0 Requires Chilkat v11.0.0+
Visual Basic 6.0
Inspect blind-copy recipients and prepare a shareable copy
See more Email Object Examples
Keep the addressed Email object for SMTP submission. When exporting a copy to share, clear its Bcc collection before saving. Treat intermediate MIME buffers as private because a renderer can preserve blind-copy details.
Chilkat Visual Basic 6.0 Downloads
Dim success As Long
success = 0
' Assumes Chilkat is unlocked. See Global Unlock Sample.
Dim email As New ChilkatEmail
email.From = "Workshop team <events@example.com>"
success = email.AddTo("Alex Rivera","alex@example.net")
If (success <> 1) Then
Debug.Print email.LastErrorText
Exit Sub
End If
email.Subject = "Workshop registration"
email.Body = "Your workshop confirmation."
success = email.AddBcc("Archive","archive@example.com")
If (success <> 1) Then
Debug.Print email.LastErrorText
Exit Sub
End If
Dim i As Long
i = 0
Do While (i < email.NumBcc)
Debug.Print "Envelope blind copy: " & email.GetBccAddr(i)
i = i + 1
Loop
' Keep the original delivery list intact. Remove blind copies from the export.
Dim rendered As New ChilkatBinData
success = email.GetMimeBd(rendered)
If (success <> 1) Then
Debug.Print email.LastErrorText
Exit Sub
End If
Dim copy As New ChilkatEmail
success = copy.SetFromMimeBd(rendered)
If (success <> 1) Then
Debug.Print copy.LastErrorText
Exit Sub
End If
copy.ClearBcc
success = copy.SaveEml("shareable.eml")
If (success <> 1) Then
Debug.Print copy.LastErrorText
Exit Sub
End If
Debug.Print "Bcc entries in shareable copy: " & copy.NumBcc