---
title: "setCcRecipients(_:)"
framework: Message UI
role: symbol
role_heading: Instance Method
platforms: [iOS 3.0+, iPadOS 3.0+, Mac Catalyst 13.1+, visionOS 1.0+]
path: "messageui/mfmailcomposeviewcontroller/setccrecipients(_:)"
---

# setCcRecipients(_:)

Sets the initial recipients to include in the email’s Cc field.

## Declaration

```swift
func setCcRecipients(_ ccRecipients: [String]?)
```

## Parameters

- `ccRecipients`: An array of doc://com.apple.documentation/documentation/Swift/String objects, each containing the email address of a single recipient.

## Discussion

Discussion This method replaces the previous carbon-copy (Cc) recipients with the new ones listed in the ccRecipients parameter. This method doesn’t filter out duplicate email addresses, so if duplicates are present, multiple copies of the email message may be sent to the same address. Only call this method before you display the mail composition interface. Don’t call it after presenting the interface to the user.

## See Also

### Setting mail fields programmatically

- [setSubject(_:)](messageui/mfmailcomposeviewcontroller/setsubject(_:).md)
- [setToRecipients(_:)](messageui/mfmailcomposeviewcontroller/settorecipients(_:).md)
- [setBccRecipients(_:)](messageui/mfmailcomposeviewcontroller/setbccrecipients(_:).md)
- [setMessageBody(_:isHTML:)](messageui/mfmailcomposeviewcontroller/setmessagebody(_:ishtml:).md)
- [addAttachmentData(_:mimeType:fileName:)](messageui/mfmailcomposeviewcontroller/addattachmentdata(_:mimetype:filename:).md)
- [setPreferredSendingEmailAddress(_:)](messageui/mfmailcomposeviewcontroller/setpreferredsendingemailaddress(_:).md)
