Xojo Plugin
Xojo Plugin
Clear the Cc Recipients of an Email
See more Email Object Examples
Demonstrates the Chilkat Email.ClearCC method, which clears the list of carbon-copy (Cc) recipients. It changes only the current in-memory email object and does not affect messages already sent. This example adds two Cc recipients, clears them, and prints the count before and after.
Background: When an
Email object is reused to send personalized messages, the Cc list from one send would otherwise carry over to the next. ClearCC resets just that list, letting you re-populate it per recipient while keeping the rest of the message intact. It is the counterpart to ClearTo and ClearBcc.Chilkat Xojo Plugin Downloads
// Demonstrates the ClearCC method, which clears the list of carbon-copy (Cc) recipients.
// This changes only the current email object.
Dim email As New Chilkat.Email
Dim success As Boolean
success = email.AddCC("Joe","joe@example.com")
success = email.AddCC("Jane","jane@example.com")
System.DebugLog("NumCC before clear = " + Str(email.NumCC))
// Remove all Cc recipients.
email.ClearCC
System.DebugLog("NumCC after clear = " + Str(email.NumCC))