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

109 Posts

Post

Replies

Boosts

Views

Activity

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
600
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
640
Jul ’23
Mail app MacOS not searching
Hi all, I've noticed that my app mail doesn't work well anymore. Anytime I try to search it gives me 0 results, or if any results appear, they will take minutes to come. I've tried rebuilding the mailbox, tried to rebuild the spotlight. Deleted the V10 folder, updated to Sonoma beta version. Nothing seems to make it work. Some of my mail boxes only have around 1000 emails and always worked fine. Is there any way to freshly install the app ? or only a new macOS installation will sort this out ?
0
0
476
Jul ’23
Delete a message
I was looking at creating a Action Mail Extension to programatically delete an e-mail in MacOS Mail. However, it seems MEMessageAction only supports moving the message to the Trash folder (or Junk and Archive). Mail (v16) itself seems to offer this capability in its' Junk Mail Advanced dialog's "Perform the following actions" picker in the form of a "Delete Message" choice. However, in practice I haven't been able to get this to work for an iCloud account which is why I was looking into the Mail Extensions route. Is this an action that could be addressed in a future rev. of Mail Extensions or is there a different way I could go about this today? Thank you!
0
0
482
Jul ’23
Alamofire Error
I keep getting this error when I try to run my app: responseValidationFailed(reason:Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 401)) Status code: 401 I am just trying to incorporate Mailgun into my app. I've don't=e some reaserch and people keep saying that I put in an invalid API key, but it is the correct one! Help would be much appreciated. Here's the code (obviously the API Key and domain would be filled in with my actual one): import SwiftUI import Alamofire import SwiftyJSON struct ContentView: View { let mailgunAPIKey = "-apikey-" let mailgunDomain = "-mailgundomain-" let recipientEmail = "email@email.com" @State private var userEmail = "" @State private var showAlert = false var body: some View { VStack { TextField("Your Email", text: $userEmail) .textFieldStyle(RoundedBorderTextFieldStyle()) .padding() Button(action: { sendEmail() }) { Text("Send Email") } } .alert(isPresented: $showAlert) { Alert(title: Text("Success"), message: Text("Email sent successfully"), dismissButton: .default(Text("OK"))) } } func sendEmail() { let parameters: [String: String] = [ "from": userEmail, "to": recipientEmail, "subject": "Test Email", "text": "Hello from Mailgun!" ] AF.request("https://api.mailgun.net/v3/\(mailgunDomain)/messages", method: .post, parameters: parameters, encoding: URLEncoding.httpBody, headers: HTTPHeaders(["Authorization": "Basic \(mailgunAPIKey)"])) .validate() .responseJSON { response in switch response.result { case .success(let value): if let json = value as? [String: Any] { print(json) showAlert = true // Show the alert on success } else { print("Error parsing JSON response") } case .failure(let error): print(error) if let statusCode = response.response?.statusCode { print("Status code: \(statusCode)") } // Handle error } } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
0
0
2.2k
Jun ’23
Signing and encryption controls not being rendered
I'm writing a security extension which implements the MEMessageSecurityHandler protocol. The problem I experience is related to the encodingStatus method as defined here. The problem is that when I return the following MEOutgoingMessageEncodingStatus instance the signing and encryption controls don't appear even though I believe they should: MEOutgoingMessageEncodingStatus( canSign: false, canEncrypt: true, securityError: nil, addressesFailingEncryption: [] ) Any other combination of the canSign and canEncrypt properties does generate the expected output. So... is there anything I'm missing? Thanks a ton for your time!
0
0
947
Jun ’23
Appointment booking feature in my app
Hey everyone, I am building an app for my dad's business and I have implemented a feature where you can book a consultation with him. You can select a date, enter your name and your email and a note if you'd like. And when you press "Book", it sends an email to my dad with all of the info that you inputted. That all works well, but when you select the "Book" button, the mail composer pops up with the appointment info that you inputted. But I would like for the email to automatically send to my dad when the user presses "Book", I don't want the user to have to send the email along with pressing the "Book" button. Is this possible? And if not, what are some other ways that I can implement the appointment booking software? Any help would be appreciated! Thanks in advance. Here is the code for the booking page: import UIKit import MessageUI struct AppointmentFormView: View { @State private var name: String = "" @State private var contact: String = "" @State private var selectedDate = Date() @State private var notes: String = "" @State private var showAlert = false var body: some View { Form { Section(header: Text("Personal Information")) { TextField("First + Last Name", text: $name) TextField("Your Email Address", text: $contact) } Section(header: Text("Appointment Details")) { DatePicker("When would you like your appointment?", selection: $selectedDate, displayedComponents: [.date]) TextField("Anything you'd like us to know?", text: $notes) } Button(action: { // Perform validation and backend tasks bookAppointment() }) { Text("Book") } } .alert(isPresented: $showAlert) { Alert(title: Text("Appointment Booked"), message: Text("Your appointment has been successfully booked."), dismissButton: .default(Text("OK"))) } } private func bookAppointment() { // Perform validation and backend tasks here // Example implementation: show alert when appointment is booked showAlert = true // Compose and send the email notification let mailView = MailView(recipientEmail: "inquiries@metricacarpentry.com", subject: "New Appointment Booked", messageBody: """ Name: \(name) Contact: \(contact) Date: \(selectedDate) Notes: \(notes) """) UIApplication.shared.windows.first?.rootViewController?.present(UIHostingController(rootView: mailView), animated: true, completion: nil) } } struct UIMailView: UIViewControllerRepresentable { let recipientEmail: String let subject: String let messageBody: String @Binding var showAlert: Bool // Add showAlert binding func makeUIViewController(context: Context) -> MFMailComposeViewController { let composeVC = MFMailComposeViewController() composeVC.mailComposeDelegate = context.coordinator composeVC.setToRecipients([recipientEmail]) composeVC.setSubject(subject) composeVC.setMessageBody(messageBody, isHTML: false) return composeVC } func updateUIViewController(_ uiViewController: MFMailComposeViewController, context: Context) { // No need to update the view controller } func makeCoordinator() -> Coordinator { Coordinator(showAlert: $showAlert) // Pass showAlert binding to Coordinator } final class Coordinator: NSObject, MFMailComposeViewControllerDelegate { @Binding var showAlert: Bool init(showAlert: Binding<Bool>) { _showAlert = showAlert } func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) { EmailHelper.getRootViewController()?.dismiss(animated: true, completion: nil) if result == .sent { let alert = UIAlertController(title: "Email Sent ✅", message: "Thanks for your inquiry! We'll get back to you within 24 hours.", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil)) EmailHelper.getRootViewController()?.present(alert, animated: true, completion: nil) } } } }
1
0
1.2k
Jun ’23
Feature Requests
As long time Mail plugin developer (11 years) I really welcome the addition of extensions for Mail. Unfortunately for now the feature set is very minimal and will only help us to implement a minimal viable version of our product if we switch to it. Is the current API set in stone for macOS Monterey or does it make sense to send feature requests? If so, where it the best place to post them? Here or via Radar? Thanks!
3
0
2.4k
Jun ’23
iCloud IMAP server bug
I previously got no relevant replies here so I'm trying again. I'm hoping to connect to an Apple engineer here. Issue description: For some fetched messages, the ENVELOPE's message-ID contains unescaped double quotes where those are not allowed according to the RFC (not allowed to link to that here but it's specified in section 9 of the RFC3501). Like this: "<"392889836.11.1529401004417.JavaMail.Redacted"@Redacted>" This causes some IMAP clients to crash or not sync properly (hence not working well or at all with iCloud mail accounts). Proposed fix The double quotes iCloud returns in the response should instead be escaped like this: "<\"392889836.11.1529401004417.JavaMail.Redacted\"@Redacted>" in order to comply with the RFC. More details For more details about how I discovered this issue, please see this.
1
0
947
Jun ’23
Outlook for Mac Disaster
All developers hate Mac when it comes to Outlook. I will list the two most frustrating things about Mac when it comes to using Apple: Email folders are not highlighted, so you cannot view and open folders fast when needed. It is not possible to move an email folder from one email to another, lets say you have an info@ email and name@ email, there is no way to move the folder unless its IMAP, but companies use 365 so how can you do that. For a company like APPLE this should be an easy solution and its a pitty that many users in companies refrain from buying apple computers when all these features are unavailable.
1
0
719
May ’23
How to control text signature for email drafts using MailKit(Mail Extensions) on MacOS?
I am currently working on a project where I need to control the text signature for email drafts using MailKit(Mail Extension) on MacOS. However, I am not sure if this is possible or not. I have not been able to find any information on this in the MailKit documentation (https://developer.apple.com/documentation/mailkit). Signature selection I want to control/switch by a dropdown the signature of an email draft using swift code extension with MailKit. Has anyone had experience with this before? Is there a way to control the signature for email drafts using MailKit on MacOS? If so, could you please provide some guidance or code snippets on how to achieve this? Any help would be greatly appreciated. Thank you in advance!
1
0
712
May ’23
Mail problems
Since downloading latest beta update my mail app not working properly it will only send and receive outlook mail stopped sending and receiving emails from aol and gmail have tried several times to uninstall and reinstall mail app but keep getting same result
0
0
410
Apr ’23
Make "Send" button inactive during MEComposeSessionHandler work.
What if "session:canSendMessageWithCompletionHandler:" method has to take a couple of seconds to make a decision? User may be confused when he click "Send" button and nothing is happen at once. Is there a legal way to make "Send" button disabled during MEComposeSessionHandler work? Or may be there another way to show some progress that my mail extension is working? May be it is possible to show modal window?
0
0
612
Apr ’23
Is there an example domain that has success receiving e-mail at iCloud+?
Even after following these instruction for my domain DSLWest.com absolutely no mail has ever landed in the iCloud account for user deecapp. We are now losing our domain because we can't do password recovery via e-mail. Final goal: I’d like to keep DSLWest.com with OpenSRS registrar but want to move e-mail hosting to Apple/iCloud+ since this is just maintenance account. I’ve used the following instructions and you can see by the dig output below that it seems to be setup properly. Apple's MX setup instructions for DNS: https://developer.apple.com/forums/thread/691367 Ideas? dig dslwest.com MX _+noall +answer ; <<>> DiG 9.10.6 <<>> dslwest.com MX _+noall +answer ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53170 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 13 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;dslwest.com. IN MX ;; ANSWER SECTION: dslwest.com. 300 IN MX 10 mx01.mail.icloud.com. dslwest.com. 300 IN MX 10 mx02.mail.icloud.com. ;; ADDITIONAL SECTION: mx02.mail.icloud.com. 106 IN A 17.42.251.62 mx02.mail.icloud.com. 106 IN A 17.57.152.5 mx02.mail.icloud.com. 106 IN A 17.57.154.33 mx02.mail.icloud.com. 106 IN A 17.57.155.34 mx02.mail.icloud.com. 106 IN A 17.57.156.30 mx02.mail.icloud.com. 106 IN A 17.56.9.29 mx01.mail.icloud.com. 135 IN A 17.57.156.30 mx01.mail.icloud.com. 135 IN A 17.42.251.62 mx01.mail.icloud.com. 135 IN A 17.57.152.5 mx01.mail.icloud.com. 135 IN A 17.57.154.33 mx01.mail.icloud.com. 135 IN A 17.57.155.34 mx01.mail.icloud.com. 135 IN A 17.56.9.29
0
0
480
Apr ’23
App email
In this post, I want to ask and explain a situation that all of us iPhone users also find ourselves in every day. In Email app, original of IOS, why the attachments are at the end of the email? No one has ever thought that if we have an email with a very large email thread, the signature to see what files are attached is only by scrolling down to the end of the whole post to view what is there? Nobody has thought of anchoring them at the beginning of the message as android does? It is unbelievable. !! An example would be to be able to click on the "clip" of attachments that appears in the email and a drop down menu with several options and one of them is to view the attachments, or download them, or save them or share them etc. without having to go down to the end of the entire chain of emails! Thanks
2
0
616
Feb ’23
Mail Extension not always recognised
Hello, we developed a Mail Extension as part of our product but, unfortunately, sometimes it is not recognized by the operating system. We still do not have a solid reproducer but I believe it is related to the automatic plugin discovery. We can reliably reproduce the scenario on one dev machine only - we tried several reinstalls of the app, unfortunately with no change in the plugin's discovery behavior. We use .pkg installer created using Packages. In the console logs, I can see several messages related to the plugin: Installer launched, logs that the application's plugin was discovered by LaunchServices, and a plugin notification was sent (com.apple.LaunchServices.pluginsregistered), logs that the plugin was found by Finder, NotificationCenter, pkd, Google Chrome, and other apps' LaunchServices observers, a message that mod date of the application has changed followed by the application unregister notification (com.apple.LaunchServices.applicationUnregistered), application register notifications again (com.apple.LaunchServices.applicationRegistered) but without any plugin-related messages. Not sure what is going on at points (4) and (5) or if the apps found at (2) were some leftovers removed by the installer (which should not be the case as it was always a clean install). Also, whether the Mail app runs during the installation or not, makes no difference. It does not know about the extension in any case. The plugin is neither in the Mail's settings nor listed in its console logs. Command pluginkit -m -D -i <bundle id> -v does not return any match either. On other machines, the problem occurs only with very few installations. When it does, a restart of the Mail app does not help, nor restart of the app which contains the plugin. Sometimes it starts working when the parent app is restarted using launchctl. Registering the plugin manually using pluginkit -a <path to appex> works every time. Does anybody experienced similar behavior or know what could be the cause? Thanks for any tips.
0
0
762
Dec ’22
Sending email from Spike.app from iCloud mail account not turning up with recipients
For a couple of weeks now, any emails sent via Spike app from iCloud email account are not being delivered to the recipients - tests confirmed with various IMAP CPanel email accounts, Microsoft 365 Exchange. The messages show in the sent box in Spike, and also in native mail.app sent folder and also showing in sent at iCloud.com. No hint of whey they are not being delivered. No messages in any queues or quarantines on the recipient servers. Spike blaming apple and says it's also affecting other 3rd party apps and waiting on a global rollout fix by apple. Can't see any other messages similar on these forums. Any ideas why this could be happening?
3
3
1.4k
Dec ’22
Writing a mail extension that can delete messages
I am wondering if there is a way to add an ME message action that can delete a message. I see that it is possible to move messages to various folders but I want to write an extension that can delete messages if they meet certain criteria.
Replies
0
Boosts
0
Views
557
Activity
Sep ’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
Replies
0
Boosts
0
Views
600
Activity
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
Replies
1
Boosts
0
Views
640
Activity
Jul ’23
Mail app MacOS not searching
Hi all, I've noticed that my app mail doesn't work well anymore. Anytime I try to search it gives me 0 results, or if any results appear, they will take minutes to come. I've tried rebuilding the mailbox, tried to rebuild the spotlight. Deleted the V10 folder, updated to Sonoma beta version. Nothing seems to make it work. Some of my mail boxes only have around 1000 emails and always worked fine. Is there any way to freshly install the app ? or only a new macOS installation will sort this out ?
Replies
0
Boosts
0
Views
476
Activity
Jul ’23
Delete a message
I was looking at creating a Action Mail Extension to programatically delete an e-mail in MacOS Mail. However, it seems MEMessageAction only supports moving the message to the Trash folder (or Junk and Archive). Mail (v16) itself seems to offer this capability in its' Junk Mail Advanced dialog's "Perform the following actions" picker in the form of a "Delete Message" choice. However, in practice I haven't been able to get this to work for an iCloud account which is why I was looking into the Mail Extensions route. Is this an action that could be addressed in a future rev. of Mail Extensions or is there a different way I could go about this today? Thank you!
Replies
0
Boosts
0
Views
482
Activity
Jul ’23
Problem with autodiscover on Mail app
I tried to configure autodiscover service for Mac Mail. Application cannot set configuration for mailbox from autodiscover. On DNS i've all required records, i've autodiscover.xml on server with actual settings for mailbox. Can you tell me, what i did wrong?
Replies
0
Boosts
0
Views
925
Activity
Jun ’23
Alamofire Error
I keep getting this error when I try to run my app: responseValidationFailed(reason:Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 401)) Status code: 401 I am just trying to incorporate Mailgun into my app. I've don't=e some reaserch and people keep saying that I put in an invalid API key, but it is the correct one! Help would be much appreciated. Here's the code (obviously the API Key and domain would be filled in with my actual one): import SwiftUI import Alamofire import SwiftyJSON struct ContentView: View { let mailgunAPIKey = "-apikey-" let mailgunDomain = "-mailgundomain-" let recipientEmail = "email@email.com" @State private var userEmail = "" @State private var showAlert = false var body: some View { VStack { TextField("Your Email", text: $userEmail) .textFieldStyle(RoundedBorderTextFieldStyle()) .padding() Button(action: { sendEmail() }) { Text("Send Email") } } .alert(isPresented: $showAlert) { Alert(title: Text("Success"), message: Text("Email sent successfully"), dismissButton: .default(Text("OK"))) } } func sendEmail() { let parameters: [String: String] = [ "from": userEmail, "to": recipientEmail, "subject": "Test Email", "text": "Hello from Mailgun!" ] AF.request("https://api.mailgun.net/v3/\(mailgunDomain)/messages", method: .post, parameters: parameters, encoding: URLEncoding.httpBody, headers: HTTPHeaders(["Authorization": "Basic \(mailgunAPIKey)"])) .validate() .responseJSON { response in switch response.result { case .success(let value): if let json = value as? [String: Any] { print(json) showAlert = true // Show the alert on success } else { print("Error parsing JSON response") } case .failure(let error): print(error) if let statusCode = response.response?.statusCode { print("Status code: \(statusCode)") } // Handle error } } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
Replies
0
Boosts
0
Views
2.2k
Activity
Jun ’23
Signing and encryption controls not being rendered
I'm writing a security extension which implements the MEMessageSecurityHandler protocol. The problem I experience is related to the encodingStatus method as defined here. The problem is that when I return the following MEOutgoingMessageEncodingStatus instance the signing and encryption controls don't appear even though I believe they should: MEOutgoingMessageEncodingStatus( canSign: false, canEncrypt: true, securityError: nil, addressesFailingEncryption: [] ) Any other combination of the canSign and canEncrypt properties does generate the expected output. So... is there anything I'm missing? Thanks a ton for your time!
Replies
0
Boosts
0
Views
947
Activity
Jun ’23
Appointment booking feature in my app
Hey everyone, I am building an app for my dad's business and I have implemented a feature where you can book a consultation with him. You can select a date, enter your name and your email and a note if you'd like. And when you press "Book", it sends an email to my dad with all of the info that you inputted. That all works well, but when you select the "Book" button, the mail composer pops up with the appointment info that you inputted. But I would like for the email to automatically send to my dad when the user presses "Book", I don't want the user to have to send the email along with pressing the "Book" button. Is this possible? And if not, what are some other ways that I can implement the appointment booking software? Any help would be appreciated! Thanks in advance. Here is the code for the booking page: import UIKit import MessageUI struct AppointmentFormView: View { @State private var name: String = "" @State private var contact: String = "" @State private var selectedDate = Date() @State private var notes: String = "" @State private var showAlert = false var body: some View { Form { Section(header: Text("Personal Information")) { TextField("First + Last Name", text: $name) TextField("Your Email Address", text: $contact) } Section(header: Text("Appointment Details")) { DatePicker("When would you like your appointment?", selection: $selectedDate, displayedComponents: [.date]) TextField("Anything you'd like us to know?", text: $notes) } Button(action: { // Perform validation and backend tasks bookAppointment() }) { Text("Book") } } .alert(isPresented: $showAlert) { Alert(title: Text("Appointment Booked"), message: Text("Your appointment has been successfully booked."), dismissButton: .default(Text("OK"))) } } private func bookAppointment() { // Perform validation and backend tasks here // Example implementation: show alert when appointment is booked showAlert = true // Compose and send the email notification let mailView = MailView(recipientEmail: "inquiries@metricacarpentry.com", subject: "New Appointment Booked", messageBody: """ Name: \(name) Contact: \(contact) Date: \(selectedDate) Notes: \(notes) """) UIApplication.shared.windows.first?.rootViewController?.present(UIHostingController(rootView: mailView), animated: true, completion: nil) } } struct UIMailView: UIViewControllerRepresentable { let recipientEmail: String let subject: String let messageBody: String @Binding var showAlert: Bool // Add showAlert binding func makeUIViewController(context: Context) -> MFMailComposeViewController { let composeVC = MFMailComposeViewController() composeVC.mailComposeDelegate = context.coordinator composeVC.setToRecipients([recipientEmail]) composeVC.setSubject(subject) composeVC.setMessageBody(messageBody, isHTML: false) return composeVC } func updateUIViewController(_ uiViewController: MFMailComposeViewController, context: Context) { // No need to update the view controller } func makeCoordinator() -> Coordinator { Coordinator(showAlert: $showAlert) // Pass showAlert binding to Coordinator } final class Coordinator: NSObject, MFMailComposeViewControllerDelegate { @Binding var showAlert: Bool init(showAlert: Binding<Bool>) { _showAlert = showAlert } func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) { EmailHelper.getRootViewController()?.dismiss(animated: true, completion: nil) if result == .sent { let alert = UIAlertController(title: "Email Sent ✅", message: "Thanks for your inquiry! We'll get back to you within 24 hours.", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil)) EmailHelper.getRootViewController()?.present(alert, animated: true, completion: nil) } } } }
Replies
1
Boosts
0
Views
1.2k
Activity
Jun ’23
Feature Requests
As long time Mail plugin developer (11 years) I really welcome the addition of extensions for Mail. Unfortunately for now the feature set is very minimal and will only help us to implement a minimal viable version of our product if we switch to it. Is the current API set in stone for macOS Monterey or does it make sense to send feature requests? If so, where it the best place to post them? Here or via Radar? Thanks!
Replies
3
Boosts
0
Views
2.4k
Activity
Jun ’23
iCloud IMAP server bug
I previously got no relevant replies here so I'm trying again. I'm hoping to connect to an Apple engineer here. Issue description: For some fetched messages, the ENVELOPE's message-ID contains unescaped double quotes where those are not allowed according to the RFC (not allowed to link to that here but it's specified in section 9 of the RFC3501). Like this: "<"392889836.11.1529401004417.JavaMail.Redacted"@Redacted>" This causes some IMAP clients to crash or not sync properly (hence not working well or at all with iCloud mail accounts). Proposed fix The double quotes iCloud returns in the response should instead be escaped like this: "<\"392889836.11.1529401004417.JavaMail.Redacted\"@Redacted>" in order to comply with the RFC. More details For more details about how I discovered this issue, please see this.
Replies
1
Boosts
0
Views
947
Activity
Jun ’23
Default mail app request
Hi all, I've been trying for over a year to get a review for our app to become a default mail app request. I've sent emails to our devrel contact, the app review contact, and tried to find other places to look. How can we get this processed?
Replies
0
Boosts
0
Views
612
Activity
May ’23
Outlook for Mac Disaster
All developers hate Mac when it comes to Outlook. I will list the two most frustrating things about Mac when it comes to using Apple: Email folders are not highlighted, so you cannot view and open folders fast when needed. It is not possible to move an email folder from one email to another, lets say you have an info@ email and name@ email, there is no way to move the folder unless its IMAP, but companies use 365 so how can you do that. For a company like APPLE this should be an easy solution and its a pitty that many users in companies refrain from buying apple computers when all these features are unavailable.
Replies
1
Boosts
0
Views
719
Activity
May ’23
How to control text signature for email drafts using MailKit(Mail Extensions) on MacOS?
I am currently working on a project where I need to control the text signature for email drafts using MailKit(Mail Extension) on MacOS. However, I am not sure if this is possible or not. I have not been able to find any information on this in the MailKit documentation (https://developer.apple.com/documentation/mailkit). Signature selection I want to control/switch by a dropdown the signature of an email draft using swift code extension with MailKit. Has anyone had experience with this before? Is there a way to control the signature for email drafts using MailKit on MacOS? If so, could you please provide some guidance or code snippets on how to achieve this? Any help would be greatly appreciated. Thank you in advance!
Replies
1
Boosts
0
Views
712
Activity
May ’23
Mail problems
Since downloading latest beta update my mail app not working properly it will only send and receive outlook mail stopped sending and receiving emails from aol and gmail have tried several times to uninstall and reinstall mail app but keep getting same result
Replies
0
Boosts
0
Views
410
Activity
Apr ’23
Make "Send" button inactive during MEComposeSessionHandler work.
What if "session:canSendMessageWithCompletionHandler:" method has to take a couple of seconds to make a decision? User may be confused when he click "Send" button and nothing is happen at once. Is there a legal way to make "Send" button disabled during MEComposeSessionHandler work? Or may be there another way to show some progress that my mail extension is working? May be it is possible to show modal window?
Replies
0
Boosts
0
Views
612
Activity
Apr ’23
Is there an example domain that has success receiving e-mail at iCloud+?
Even after following these instruction for my domain DSLWest.com absolutely no mail has ever landed in the iCloud account for user deecapp. We are now losing our domain because we can't do password recovery via e-mail. Final goal: I’d like to keep DSLWest.com with OpenSRS registrar but want to move e-mail hosting to Apple/iCloud+ since this is just maintenance account. I’ve used the following instructions and you can see by the dig output below that it seems to be setup properly. Apple's MX setup instructions for DNS: https://developer.apple.com/forums/thread/691367 Ideas? dig dslwest.com MX _+noall +answer ; <<>> DiG 9.10.6 <<>> dslwest.com MX _+noall +answer ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53170 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 13 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;dslwest.com. IN MX ;; ANSWER SECTION: dslwest.com. 300 IN MX 10 mx01.mail.icloud.com. dslwest.com. 300 IN MX 10 mx02.mail.icloud.com. ;; ADDITIONAL SECTION: mx02.mail.icloud.com. 106 IN A 17.42.251.62 mx02.mail.icloud.com. 106 IN A 17.57.152.5 mx02.mail.icloud.com. 106 IN A 17.57.154.33 mx02.mail.icloud.com. 106 IN A 17.57.155.34 mx02.mail.icloud.com. 106 IN A 17.57.156.30 mx02.mail.icloud.com. 106 IN A 17.56.9.29 mx01.mail.icloud.com. 135 IN A 17.57.156.30 mx01.mail.icloud.com. 135 IN A 17.42.251.62 mx01.mail.icloud.com. 135 IN A 17.57.152.5 mx01.mail.icloud.com. 135 IN A 17.57.154.33 mx01.mail.icloud.com. 135 IN A 17.57.155.34 mx01.mail.icloud.com. 135 IN A 17.56.9.29
Replies
0
Boosts
0
Views
480
Activity
Apr ’23
App email
In this post, I want to ask and explain a situation that all of us iPhone users also find ourselves in every day. In Email app, original of IOS, why the attachments are at the end of the email? No one has ever thought that if we have an email with a very large email thread, the signature to see what files are attached is only by scrolling down to the end of the whole post to view what is there? Nobody has thought of anchoring them at the beginning of the message as android does? It is unbelievable. !! An example would be to be able to click on the "clip" of attachments that appears in the email and a drop down menu with several options and one of them is to view the attachments, or download them, or save them or share them etc. without having to go down to the end of the entire chain of emails! Thanks
Replies
2
Boosts
0
Views
616
Activity
Feb ’23
Mail Extension not always recognised
Hello, we developed a Mail Extension as part of our product but, unfortunately, sometimes it is not recognized by the operating system. We still do not have a solid reproducer but I believe it is related to the automatic plugin discovery. We can reliably reproduce the scenario on one dev machine only - we tried several reinstalls of the app, unfortunately with no change in the plugin's discovery behavior. We use .pkg installer created using Packages. In the console logs, I can see several messages related to the plugin: Installer launched, logs that the application's plugin was discovered by LaunchServices, and a plugin notification was sent (com.apple.LaunchServices.pluginsregistered), logs that the plugin was found by Finder, NotificationCenter, pkd, Google Chrome, and other apps' LaunchServices observers, a message that mod date of the application has changed followed by the application unregister notification (com.apple.LaunchServices.applicationUnregistered), application register notifications again (com.apple.LaunchServices.applicationRegistered) but without any plugin-related messages. Not sure what is going on at points (4) and (5) or if the apps found at (2) were some leftovers removed by the installer (which should not be the case as it was always a clean install). Also, whether the Mail app runs during the installation or not, makes no difference. It does not know about the extension in any case. The plugin is neither in the Mail's settings nor listed in its console logs. Command pluginkit -m -D -i <bundle id> -v does not return any match either. On other machines, the problem occurs only with very few installations. When it does, a restart of the Mail app does not help, nor restart of the app which contains the plugin. Sometimes it starts working when the parent app is restarted using launchctl. Registering the plugin manually using pluginkit -a <path to appex> works every time. Does anybody experienced similar behavior or know what could be the cause? Thanks for any tips.
Replies
0
Boosts
0
Views
762
Activity
Dec ’22
Sending email from Spike.app from iCloud mail account not turning up with recipients
For a couple of weeks now, any emails sent via Spike app from iCloud email account are not being delivered to the recipients - tests confirmed with various IMAP CPanel email accounts, Microsoft 365 Exchange. The messages show in the sent box in Spike, and also in native mail.app sent folder and also showing in sent at iCloud.com. No hint of whey they are not being delivered. No messages in any queues or quarantines on the recipient servers. Spike blaming apple and says it's also affecting other 3rd party apps and waiting on a global rollout fix by apple. Can't see any other messages similar on these forums. Any ideas why this could be happening?
Replies
3
Boosts
3
Views
1.4k
Activity
Dec ’22