PowerBuilder
PowerBuilder
Count the Cc Recipients of an Email
See more Email Object Examples
Demonstrates the read-only Chilkat Email.NumCC property, which is the number of carbon-copy (Cc) recipients. Cc recipient indexes are zero-based and can be inspected with GetCC, GetCcAddr, and GetCcName. This example adds two Cc recipients and prints the count.
Background: The term "carbon copy" predates email — it comes from the carbon paper once used to make duplicate copies of typed letters. In email,
Cc recipients receive a visible copy of the message and, by convention, are people who should be kept informed but are not the primary audience (that role belongs to the To recipients). All To and Cc addresses are visible to every recipient.Chilkat PowerBuilder Downloads
integer li_rc
oleobject loo_Email
// Demonstrates the read-only Email.NumCC property, which is the number of
// carbon-copy (Cc) recipients. Cc indexes are zero-based.
loo_Email = create oleobject
li_rc = loo_Email.ConnectToNewObject("Chilkat.Email")
if li_rc < 0 then
destroy loo_Email
MessageBox("Error","Connecting to COM object failed")
return
end if
loo_Email.AddCC("Joe","joe@example.com")
loo_Email.AddCC("Jane","jane@example.com")
Write-Debug "NumCC = " + string(loo_Email.NumCC)
destroy loo_Email