Contents

MEExtension

A type that provides objects for manipulating email messages, such as performing actions on messages or blocking content when users view messages.

Declaration

@MainActor protocol MEExtension : NSObjectProtocol

Overview

To implement an app extension, you provide an object that conforms to the MEExtension protocol. The MEExtensionCapabilities key of your extension’s Info.plist defines the capabilities that you support, as follows:

<key>NSExtensionAttributes</key>
<dict>
    <key>MEExtensionCapabilities</key>
    <array>
        <string>MEContentBlocker</string>
        <string>MEMessageActionHandler</string>
        <string>MEComposeSessionHandler</string>
        <string>MEMessageSecurityHandler</string>
    </array>
</dict>

For each capability that your extension defines, you provide an object that implements the capability. MailKit uses the following methods to request the object for a given capability. The capability also specifies a protocol that the handler implements.

Capability Key

Method

Protocol

MEContentBlocker

Handler(for:)

Mecontentblocker

MEMessageActionHandler

Handlerformessageactions()

Memessageactionhandler

MEComposeSessionHandler

Handlerforcontentblocker()

Mecomposesessionhandler

MEMessageSecurityHandler

Handlerformessagesecurity()

Memessagesecurityhandler

Topics

Blocking Content

Performing Actions on Messages

Enhancing the Compose Window

Encrypting and Signing Messages

See Also

Essentials