---
title: MailKit
framework: MailKit
role: collection
role_heading: Framework
platforms: [macOS 12.0+]
path: mailkit
---

# MailKit

Secure, customize, and act on email messages that users send and receive.

## Overview

Overview MailKit lets your app include an app extension that customizes several features of Mail. A Mail app extension provides one or more of the following enhancements: A content blocker defines rules to prevent loading content when users view messages. An action handler performs actions such as flagging, setting colors, or archiving when Mail downloads messages. A compose session handler validates recipient email addresses, displays a view controller on Mail’s compose windows, confirms if messages are suitable for delivery, and adds custom headers. A message security handler secures messages using encryption and digital signatures. The entry point for your extension is an object that conforms to MEExtension. When MailKit invokes your extension, this objects determines the handlers that provide each capability in the list above.

## Topics

### Essentials

- [MEExtension](mailkit/meextension.md)
- [Build Mail App Extensions](mailkit/build-mail-app-extensions.md)

### Content Blockers

- [MEContentBlocker](mailkit/mecontentblocker.md)

### Message Actions

- [MEMessageActionHandler](mailkit/memessageactionhandler.md)

### Compose Window Enhancements

- [MEComposeSessionHandler](mailkit/mecomposesessionhandler.md)

### Message Encryption, Decryption, and Digital Signatures

- [MEMessageSecurityHandler](mailkit/memessagesecurityhandler.md)

### Message Properties

- [MEMessage](mailkit/memessage.md)
- [MEMessageState](mailkit/memessagestate.md)

### Custom View Controllers

- [MEExtensionViewController](mailkit/meextensionviewcontroller.md)

### Structures

- [MEMessageSecurityError](mailkit/memessagesecurityerror.md)

### Classes

- [MEComposeContext](mailkit/mecomposecontext.md)
- [MEDecodedMessageBanner](mailkit/medecodedmessagebanner.md)
- [MEEmailAddress](mailkit/meemailaddress.md)
- [MEExtensionManager](mailkit/meextensionmanager.md)
