<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MessageUI",
  "identifier" : "/documentation/MessageUI/MFMailComposeViewController/canSendMail()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Message UI"
    ],
    "preciseIdentifier" : "c:objc(cs)MFMailComposeViewController(cm)canSendMail"
  },
  "title" : "canSendMail()"
}
-->

# canSendMail()

Returns a Boolean that indicates whether the current device is able to send email.

```
class func canSendMail() -> Bool
```

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the device is configured for sending email or <doc://com.apple.documentation/documentation/Swift/false> if it is not.

## Discussion

You should call this method before attempting to display the mail composition interface. If it returns <doc://com.apple.documentation/documentation/Swift/false>, you must not display the mail composition interface.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)