MailKit lets you build Mail app extensions for macOS that integrate directly into the message lifecycle. You can annotate recipient addresses with MEAddressAnnotation and MEEmailAddress, block content by adopting MEContentBlocker, and handle compose sessions through MEComposeSession and MEComposeContext. Adopt protocols such as MEMessageActionHandler, MEMessageDecoder, and MEMessageEncoder to act on messages, decode and encode them, and report message and encryption state with types like MEDecodedMessage, MEEncodedOutgoingMessage, MEMessageState, and MEMessageEncryptionState.
Essentials 2
Register your Mail extension and provide the view controllers that surface its interface.
- ClMEExtensionManagermacOS 12.0+@brief Methods in this class allow the host app to interact with their Mail extension.
- ClMEExtensionViewControllermacOS 12.0+A view controller that presents your Mail extension's interface within the Mail app.
Messages and Addresses 3
Represent the messages, recipient addresses, and annotations your extension inspects.
- ClMEMessagemacOS 12.0+@brief Contains information about a mail message on which actions can be performed.
- ClMEEmailAddressmacOS 12.0+@brief Contain information about an email address. This can include both valid and invalid email addresses.
- ClMEAddressAnnotationmacOS 12.0+@brief An instance of this class can be used to change the visual style of recipeint email address token when user in composing a mail message.
Compose Sessions 4
Observe and influence the user's compose session and its lifecycle.
- ClMEComposeSessionmacOS 12.0+@brief An instance of this class is associated with the lifecycle of a single mail compose window. This object associates the actions performed by the user in a mail compose window to a unique session
- ClMEComposeContextmacOS 12.0+@brief An object encapsulating additional information about the message being composed.
- EnMEComposeUserActionmacOS 12.0+@brief An enumeration corresponding to the action user took to start a new mail compose window.
- StMEComposeSessionErrormacOS 12.0+A structure that describes errors that occur during a compose session.
Message Actions 3
Act on incoming messages and decide how Mail should handle them.
- PrMEMessageActionHandlermacOS 12.0+@brief Methods in this protocol can be used by a mail app extension to perform actions on messages as they are downloaded.
- ClMEMessageActionmacOS 12.0+@brief An action that can be performed on a mail message.
- ClMEMessageActionDecisionmacOS 12.0+An object that represents the action decision your extension returns for a message.
Decoding Messages 3
Decode received messages and present decoded content and banners to the user.
- PrMEMessageDecodermacOS 12.0+@brief Methods in this protocol can be used by a mail app extension to decode messages.
- ClMEDecodedMessagemacOS 12.0+@brief Contains information about a decoded message
- ClMEDecodedMessageBannermacOS 12.0+@brief Contains security information in order to populate a banner in the message view.
Encoding and Signing Outgoing Messages 5
Encode, sign, and report the security state of outgoing messages.
- PrMEMessageEncodermacOS 12.0+@brief Methods in this protocol can be used by a mail app extension to encode messages.
- ClMEEncodedOutgoingMessagemacOS 12.0+An object that represents the encoded data and security details of an outgoing message.
- ClMEMessageEncodingResultmacOS 12.0+@brief Contains information about an outging mail message after any security measures have been applied.
- ClMEOutgoingMessageEncodingStatusmacOS 12.0+@brief Contains information about any security measures that will be applied to a mail message when it is sent or any errrors that occurred while verifying security status.
- ClMEMessageSignermacOS 12.0+@brief Contains information about a message signer
Message Security 4
Convey signing, encryption, and trust information for messages.
- ClMEMessageSecurityInformationmacOS 12.0+@brief Contains security information about a decoded message
- EnMEMessageStatemacOS 12.0+Constants that describe the security state of a message.
- EnMEMessageEncryptionStatemacOS 12.0+Constants that describe the encryption state of a message.
- StMEMessageSecurityErrormacOS 12.0+A structure that describes errors related to message security operations.
Content Blocking 1
Block remote content and other resources from loading in messages.
- PrMEContentBlockermacOS 12.0+@brief Methods in this protocol can be used by a mail app extension to block content in mail messages.
Protocols 3
- PrMEComposeSessionHandlermacOS 12.0+@brief Methods in this protocol can be used by a mail app extension to keep track of new messages composed by the user and to make changes to the recipeint email address tokens.
- PrMEExtensionmacOS 12.0+@brief A protocol which must be adopted by the class set as extension's `NSExtensionPrincipalClass`.
- PrMEMessageSecurityHandlermacOS 12.0+