AutoIt Requires Chilkat v11.0.0+
AutoIt
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 AutoIt Downloads
Local $bSuccess = False
; Assumes Chilkat is unlocked. See Global Unlock Sample.
$oEmail = ObjCreate("Chilkat.Email")
$oEmail.From = "Workshop team <events@example.com>"
$bSuccess = $oEmail.AddTo("Alex Rivera","alex@example.net")
If ($bSuccess <> True) Then
ConsoleWrite($oEmail.LastErrorText & @CRLF)
Exit
EndIf
$oEmail.Subject = "Workshop registration"
$oEmail.Body = "Your workshop confirmation."
$bSuccess = $oEmail.AddBcc("Archive","archive@example.com")
If ($bSuccess <> True) Then
ConsoleWrite($oEmail.LastErrorText & @CRLF)
Exit
EndIf
Local $i = 0
While ($i < $oEmail.NumBcc)
ConsoleWrite("Envelope blind copy: " & $oEmail.GetBccAddr($i) & @CRLF)
$i = $i + 1
Wend
; Keep the original delivery list intact. Remove blind copies from the export.
$oRendered = ObjCreate("Chilkat.BinData")
$bSuccess = $oEmail.GetMimeBd($oRendered)
If ($bSuccess <> True) Then
ConsoleWrite($oEmail.LastErrorText & @CRLF)
Exit
EndIf
$oCopy = ObjCreate("Chilkat.Email")
$bSuccess = $oCopy.SetFromMimeBd($oRendered)
If ($bSuccess <> True) Then
ConsoleWrite($oCopy.LastErrorText & @CRLF)
Exit
EndIf
$oCopy.ClearBcc
$bSuccess = $oCopy.SaveEml("shareable.eml")
If ($bSuccess <> True) Then
ConsoleWrite($oCopy.LastErrorText & @CRLF)
Exit
EndIf
ConsoleWrite("Bcc entries in shareable copy: " & $oCopy.NumBcc & @CRLF)