---
title: "CMSDecoderCopySignerEmailAddress(_:_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/cmsdecodercopysigneremailaddress(_:_:_:)"
---

# CMSDecoderCopySignerEmailAddress(_:_:_:)

Obtains the email address of the specified signer of a CMS message.

## Declaration

```swift
func CMSDecoderCopySignerEmailAddress(_ cmsDecoder: CMSDecoder, _ signerIndex: Int, _ signerEmailAddressOut: UnsafeMutablePointer<CFString?>) -> OSStatus
```

## Parameters

- `cmsDecoder`: The CMSDecoder reference returned by the CMSDecoderCreate function.
- `signerIndex`: A number indicating which signer’s email address to return. Signer index numbers start with 0. Use the doc://com.apple.security/documentation/Security/CMSDecoderGetNumSigners(_:_:) function to determine the total number of signers for a message.
- `signerEmailAddressOut`: On return, points to the email address of the specified signer.

## Return Value

Return Value A result code. See Security Framework Result Codes. Returns errSecParam if the CMS message was not signed or if signerIndex is greater than the number of signers of the message minus one (signerIndex > (numSigners – 1)).

## Discussion

Discussion You cannot call this function until after you have called the CMSDecoderFinalizeMessage(_:) function.

## See Also

### Related Documentation

- [CMSDecoderCreate(_:)](security/cmsdecodercreate(_:).md)
- [CMSDecoderFinalizeMessage(_:)](security/cmsdecoderfinalizemessage(_:).md)
