Xojo Plugin Requires Chilkat v11.0.0+
Xojo Plugin
Send one message with two blind copies
See more Email Object Examples
Set NoBccHeader before adding blind-copy addresses. SendEmail then includes those recipients in the SMTP envelope and omits their addresses from the message headers sent to the relay. Replace the example account and addresses before running this SMTP submission.
Chilkat Xojo Plugin Downloads
Dim success As Boolean
success = False
// Assumes Chilkat is unlocked. See Global Unlock Sample.
Dim email As New Chilkat.Email
email.From = "Workshop team <events@example.com>"
success = email.AddTo("Alex Rivera","alex@example.net")
If (success <> True) Then
System.DebugLog(email.LastErrorText)
Return
End If
email.Subject = "Workshop registration"
email.Body = "Registration is confirmed."
// Set this before AddBcc so the submitted MIME omits the Bcc header.
email.UncommonOptions = "NoBccHeader"
success = email.AddBcc("Archive","archive@example.com")
If (success <> True) Then
System.DebugLog(email.LastErrorText)
Return
End If
success = email.AddBcc("Event records","records@example.com")
If (success <> True) Then
System.DebugLog(email.LastErrorText)
Return
End If
Dim mail As New Chilkat.MailMan
mail.SmtpHost = "smtp.example.com"
mail.SmtpPort = 465
mail.SmtpSsl = True
mail.RequireSslCertVerify = True
mail.SmtpUsername = "SMTP_USERNAME"
mail.SmtpPassword = "SMTP_PASSWORD"
success = mail.SendEmail(email)
If (success <> True) Then
System.DebugLog(mail.LastErrorText)
Return
End If
System.DebugLog("SMTP relay accepted the submission.")
success = mail.CloseSmtpConnection()
If (success <> True) Then
System.DebugLog("The SMTP session did not close cleanly.")
End If