---
title: MEMessageActionHandler
framework: mailkit
role: symbol
role_heading: Protocol
path: mailkit/memessageactionhandler
---

# MEMessageActionHandler

An object that performs actions on messages as the system downloads them.

## Declaration

```swift
protocol MEMessageActionHandler : NSObjectProtocol
```

## Overview

Overview As MailKit downloads messages, it invokes the decideAction(for:completionHandler:) method on your handler. You indicate the action to take for each message, such as marking it as read or unread, flagging it, or archiving it. To indicate that your extension contains a message action handler, add MEMessageActionHandler to the MEExtensionCapabilities array in the extension’s Info.plist file: <key>NSExtensionAttributes</key> <dict>     <key>MEExtensionCapabilities</key>     <array>         <string>MEMessageActionHandler</string>     </array> </dict>

## Topics

### Performing Actions on Messages

- [decideAction(for:completionHandler:)](mailkit/memessageactionhandler/decideaction(for:completionhandler:).md)
- [MEMessageAction](mailkit/memessageaction.md)
- [MEMessageActionDecision](mailkit/memessageactiondecision.md)
- [MEMessageAction.MessageColor](mailkit/memessageaction/messagecolor.md)

### Instance Properties

- [requiredHeaders](mailkit/memessageactionhandler/requiredheaders.md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
