Name

Cc — objNewMail . Cc = strBCCRecipListString

Synopsis

A string value that contains a list of recipients who will receive a copy of the current message.

Parameters

strCCRecipListString

A string containing one or more recipient email addresses separated by semicolons (;)

Example

The following example demonstrates how to add a recipient to the Cc list for the current message:

<%

' Dimension local variables.
Dim objNewMail
Dim strCCRecipList

' Instantiate a NewMail object.
Set objNewMail = Server.CreateObject("CDONTS.NewMail")

' Set the Bcc property of the NewMail object to the following
' email addresses: (1) billw@firebird.com and 
' (2) helen@zoologyzine.com.
strCCRecipList = _
   "billw@firebird.com;helen@zoologyzine.com"

objNewMail.Cc = strCCRecipList

' Set the body string for the message.
objNewMail.Body = _
   "Wow, this message takes just a few lines of code."

' Send the message. For details about the Send method,
' see that section in this chapter.
objNewMail.Send , , "This is the subject",,cdoHigh

%>

Notes

As demonstrated in the example, the string you use to set the Cc property can contain a single email address or multiple email addresses separated by semicolons.

Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.