Mail Extensions

RSS for tag

Use Mail Extensions for composition, message actions, secure email, and content blocking in the Mail app.

Posts under Mail Extensions tag

26 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Legacy mail plugins in Mac OS Sonoma
Hi, In our organisation, we create and ship a plug-in for the MacOS Mail app along with our software package. We have heard that mail plugins are not supported in Mac OS Sonoma any more. https://www.macrumors.com/2023/06/14/macos-sonoma-drops-legacy-mail-app-plug-ins/ Can anyone tell us more details about what changed, what is its impact and any way to achieve similar functionality as the mail plugins offer, going forward. We read that mailkit extensions are a new thing, we could also use any heads up on its capabilities and limitations (if known). Thanks, Tathagata
5
0
1.8k
Oct ’23
Mail Kit MEMessageSecurityHandler causing slow message loading?
My app's Mail Extension uses the MEMessageSecurityHandler and its decoding functions but opening various emails is noticeably slower, sometimes taking 3-5s, especially on emails with attachments. Specifically, the time it takes from selecting an email from the list to the email body/contents to show up on the right panel is slow, even showing "loading" with the spinner icon. In comparison, when I disable the Mail Extension, emails open in less than a second as expected. Curiously, the "Build Mail app extensions" WWDC sample project seems to have the exact same issue despite having minimal functionality (passes through the mime data without doing any processing on it). Any idea? Env: macOS Ventura 13.4.1 (c) (22F770820d) Mail Version 16.0 (3731.600.7) Xcode 14.2
0
0
402
Jul ’23
MailKit extensionViewController(messageContext:) nil context?
In Mail Kit, MEMessageSecurityHandler.extensionViewController(messageContext:)'s context is always nil. Any idea why? class MessageSecurityHandler: NSObject, MEMessageSecurityHandler { func extensionViewController(messageContext context: Data) -> MEExtensionViewController? { let controller = ExampleSigningViewController.sharedInstance controller.msgContext = context // nil ??? why? return controller } I thought it had to do with the MEDecodedMessage.context returned in decodedMessage(forMessageData:) but changing returned the context below still results in the above giving an empty Data. func decodedMessage(forMessageData data: Data) -> MEDecodedMessage? { MEDecodedMessage( data: data, securityInformation: MEMessageSecurityInformation( signers: [], isEncrypted: true, signingError: nil, encryptionError: nil), context: data, // extensionViewController(messageContext:)'s context is still empty banner: nil) Env: macOS Ventura 13.4.1 (c) (22F770820d) Mail Version 16.0 (3731.600.7) Xcode 14.2
1
0
434
Jul ’23
macOS Mail app crashes on startup, after playing around with Mailkit
I was playing around with Mailkit. I wanted to extract some info, and show a notification when an email arrives. I copied some code that looked alright for notifications and added it to the defailt MailKit template. I ran it, enabled the extension, sent myself an email and.... Mail app crashes I restart the Mail app, and it instantly crashes on launch. I try to comment out the notification code that i added, compile it and restart the Mail app, and it still crashes. Any help for getting my Mail app back to work would be appreciated! Here is the exact code that made this happen. Don't run it locally unless you want your Mail app to no longer work. import MailKit import UserNotifications class MessageActionHandler: NSObject, MEMessageActionHandler {   static let shared = MessageActionHandler()       func decideAction(for message: MEMessage, completionHandler: @escaping (MEMessageActionDecision?) -> Void) {     // The action to take on the message, if any.     var action: MEMessageActionDecision? = nil           // Check if the subject of the message contains the word Mars.     // If it does, specify an action to set the background color to red.     if message.subject.contains("Mars") {       action = MEMessageActionDecision.action(.setBackgroundColor(.red))     }           let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 1, repeats: false)     var content = UNMutableNotificationContent()      content.title = "Message1"          content.subtitle = "subtitle"          content.body = "body"          content.sound = UNNotificationSound.default          var request = UNNotificationRequest(identifier: UUID().uuidString , content: content, trigger: trigger)          UNUserNotificationCenter.current().add(request)           // Always call the completion handler, passing the action     // to take, or nil if there's no action.     completionHandler(action)   } }
3
1
1.8k
Oct ’23