<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MailKit",
  "identifier" : "/documentation/MailKit/MEComposeSessionHandler/mailComposeSessionDidEnd(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MailKit"
    ],
    "preciseIdentifier" : "c:objc(pl)MEComposeSessionHandler(im)mailComposeSessionDidEnd:"
  },
  "title" : "mailComposeSessionDidEnd(_:)"
}
-->

# mailComposeSessionDidEnd(_:)

Informs the handler when the user closes a compose window.

```
func mailComposeSessionDidEnd(_ session: MEComposeSession)
```

## Parameters

`session`

The compose session that corresponds to the message the user is composing.

---

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)