---
title: MFMailComposeError.Code
framework: Message UI
role: symbol
role_heading: Enumeration
platforms: [iOS 3.0+, iPadOS 3.0+, Mac Catalyst 13.1+, visionOS 1.0+]
path: messageui/mfmailcomposeerror/code
---

# MFMailComposeError.Code

Error codes for NSError objects that are associated with the mail composition interface.

## Declaration

```swift
enum Code
```

## Topics

### Constants

- [MFMailComposeError.Code.saveFailed](messageui/mfmailcomposeerror/code/savefailed.md)
- [MFMailComposeError.Code.sendFailed](messageui/mfmailcomposeerror/code/sendfailed.md)

### Initializers

- [init(rawValue:)](messageui/mfmailcomposeerror/code/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Responding to errors

- [MFMailComposeError](messageui/mfmailcomposeerror.md)
- [MFMailComposeErrorDomain](messageui/mfmailcomposeerrordomain.md)
