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

Send an email with a Bcc recipient using SMTP (live send)

See more Email Object Examples

Live send. Load the previously prepared with-attachments.eml, add a Bcc recipient, and pass the Email to MailMan.SendEmail. For a real test, use a relay you control, replace the sample sender and recipients (including the Bcc address) with test mailboxes, and obtain credentials from your application’s secret store.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

;  Assumes Chilkat is unlocked. See Global Unlock Sample.

$oEmail = ObjCreate("Chilkat.Email")
$bSuccess = $oEmail.LoadEml("with-attachments.eml")
If ($bSuccess <> True) Then
    ConsoleWrite($oEmail.LastErrorText & @CRLF)
    Exit
EndIf

;  Enable this option before adding a blind recipient to the message.
$oEmail.UncommonOptions = "NoBccHeader"
$bSuccess = $oEmail.AddBcc("Bcc recipient","bcc@example.net")
If ($bSuccess <> True) Then
    ConsoleWrite($oEmail.LastErrorText & @CRLF)
    Exit
EndIf

$oMail = ObjCreate("Chilkat.MailMan")
$oMail.SmtpHost = "smtp.example.com"
$oMail.SmtpPort = 465
$oMail.SmtpSsl = True
$oMail.RequireSslCertVerify = True
$oMail.SmtpUsername = "MAIL_USER"
$oMail.SmtpPassword = "MAIL_PASSWORD"
$bSuccess = $oMail.SendEmail($oEmail)
If ($bSuccess <> True) Then
    ConsoleWrite($oMail.LastErrorText & @CRLF)
    Exit
EndIf

ConsoleWrite("The SMTP relay accepted the message." & @CRLF)
$bSuccess = $oMail.CloseSmtpConnection()
If ($bSuccess <> True) Then
    ConsoleWrite($oMail.LastErrorText & @CRLF)
    Exit
EndIf