---
title: "SecCertificateCopyEmailAddresses(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/seccertificatecopyemailaddresses(_:_:)"
---

# SecCertificateCopyEmailAddresses(_:_:)

Retrieves the email addresses for the subject of a certificate.

## Declaration

```swift
func SecCertificateCopyEmailAddresses(_ certificate: SecCertificate, _ emailAddresses: UnsafeMutablePointer<CFArray?>) -> OSStatus
```

## Parameters

- `certificate`: The certificate object from which to retrieve the email addresses.
- `emailAddresses`: On return, an array of zero or more CFStringRef elements, each containing one email address found in the certificate subject. In Objective-C, call the doc://com.apple.documentation/documentation/CoreFoundation/CFRelease function to release this object when you are finished with it.

## Return Value

Return Value A result code. See Security Framework Result Codes.

## Discussion

Discussion Not every certificate subject includes an email address. If the function does not find any email addresses, it returns a CFArrayRef object with zero elements in the array.
