Skip to content

Sample implementation of a Mail App Extension that shows a warning when the attachment of an email is missing.

Notifications You must be signed in to change notification settings

Suboptimierer/MailAppExtensionExample

Repository files navigation

Mail App Extension Example

Contains the "AttachmentReminder" target




At WWDC21, the MailKit API was introduced to develop Mail App Extensions. Unfortunately, there are still very few native Mail App Extensions in the App Store. Therefore, Apple announced further features for Mail.app in macOS at WWDC22. Starting with macOS Ventura, there are features like "Undo Send", "Scheduled Send", "Follow Up" and "Remind Me". One very basic feature is still missing though: a reminder when attachments are missing.

This repository contains a sample implementation for such a Mail App Extension. The "MailAppExtensionExample" container app contains the "AttachmentReminder" target that shows a warning when the attachment of an email is missing.

⚠️ Bugs in MailKit

There are several bugs in MailKit that have not yet been fixed by Apple in macOS 12.4. For this reason, the Mail App Extension does not work correctly. The bugs have been reported to Apple and should be fixed in future macOS versions. As soon as a bug fix exists, the development will be completed.

  1. allowMessageSendForSession(_:completion:) and allowMessageSendForSession(_:) are never called by the framework (FB10533807)
  2. session.mailMessage.rawData and session.composeContext.originalMessage?.rawData always return nil (FB10533893)

A feature request was also submitted to enable functionalities of Safari App Extensions in Mail App Extensions as well.

  1. Open "Mail App Extension" preferences panel in Mail.app and check state of extensions (FB10534874)

Container App

Mail Preferences

No Attachment Missing Example

Attachment Missing Example

About

Sample implementation of a Mail App Extension that shows a warning when the attachment of an email is missing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages