Hello,
I'm trying to build a MailKit extension that parses PDFs.
My extension initially gets the call for decide action, I request invokeAgain.
  func decideAction(for message: MEMessage, completionHandler: @escaping (MEMessageActionDecision?) -> Void) {
        guard let data = message.rawData else {
            completionHandler(MEMessageActionDecision.invokeAgainWithBody)
            return
        }
       let content = String(data: data, encoding: .utf8)
       print(content)
When I try to reconstruct the PDF attached:
I find the headers, and the text content, but I don't see the base64 content of the PDF file.
Is there something I'm missing here?
Thanks in advance
                    
                  
                Mail Extensions
RSS for tagUse Mail Extensions for composition, message actions, secure email, and content blocking in the Mail app.
Posts under Mail Extensions tag
            
              
                6 Posts
              
            
            
              
                
              
            
          
          
  
    
    Selecting any option will automatically load the page
  
  
  
  
    
  
  
              Post
Replies
Boosts
Views
Activity
                    
                      Hi,
I’m looking for guidance on enabling push notifications for new emails in the native iOS Mail app (com.apple.mobilemail).
Currently, I send push notifications using macOS Server (formerly OS X Server) Mail, but since it has been discontinued and renewal is no longer possible, I want to transition to the standard method used by email providers to notify the stock Mail app about new messages.
To achieve this, I need access to the com.apple.mobilemail.push.com.zuplu APNs topic. This follows the same pattern used by other providers:
iCloud: com.apple.mobilemail.push.com.me.mail.castle
Fastmail: com.apple.mobilemail.push.com.fastmail
Since Fastmail (as a third-party provider) has access to this, I assume there is a way for independent mail providers to integrate with XAPPLEPUSHSERVICE.
In the interest of a free market and fair competition, I trust that Apple provides a means for email providers to notify the stock Mail app of IMAP server changes, allowing it to fetch new messages instantly.
Under EU competition law, particularly Article 102 TFEU, dominant companies must not engage in anti-competitive behavior, including restricting access to essential services in a discriminatory manner. Furthermore, the Digital Markets Act (DMA) explicitly prohibits gatekeepers from favoring their own services or restricting interoperability without justification.
Any insights or official guidance would be greatly appreciated!
Thanks,
DragonWork
                    
                  
                
                    
                      Is VIP an object contained in the mail or contacts apps/objects?
Or is it just a property somewhere?
Or is it an independent object?
Where is the VIP object? Is it still managed in the mail app or is it just hidden because the design is changing at Apple?
The following AppleScript is failing:
tell application "Mail"
	set theVIPs to VIPs
with the error:
error "Die Variable „VIPs“ ist nicht definiert." number -2753 from "VIPs" (The variable "VIPs" is not defined.".
In Mail.sdef documentation and in Contacts.sdef documentation I cannot find any documentation of VIP object or VIP property.
                    
                  
                
              
                
              
              
                
                Topic:
                  
	
		App & System Services
  	
                
                
                SubTopic:
                  
                    
	
		Automation & Scripting
		
  	
                  
                
              
              
                Tags:
              
              
  
  
    
      
      
      
        
          
            Contacts
          
        
        
      
      
    
      
      
      
        
          
            AppleScript
          
        
        
      
      
    
      
      
      
        
          
            Mail Extensions
          
        
        
      
      
    
  
  
              
                
                
              
            
          
                    
                      In my Catalyst app I use
func setupMailComposer() {
        // Check if the device can send email
        guard MFMailComposeViewController.canSendMail() else {
            print("Mail services are not available")
            showMailErrorAlert()
            return
        }
        
        // Create and configure the mail composer
        let mailComposeVC = MFMailComposeViewController()
        mailComposeVC.mailComposeDelegate = self
        
        // Set the email details
        mailComposeVC.setToRecipients(["example@example.com"])
        mailComposeVC.setSubject("Subject for your email")
        mailComposeVC.setMessageBody("This is the body of the email.", isHTML: false)
        
        // Attach a file (optional)
        if let filePath = Bundle.main.path(forResource: "example", ofType: "pdf"),
           let fileData = try? Data(contentsOf: URL(fileURLWithPath: filePath)) {
            mailComposeVC.addAttachmentData(fileData, mimeType: "application/pdf", fileName: "example.pdf")
        }
        
        // Present the mail composer
        self.present(mailComposeVC, animated: true, completion: nil)
    }
Since I have updated to macOS 15.1 the canSendMail() function returns false although I have configured Apple Mail (like before in 15.0 where it worked flawlessly).
                    
                  
                
                    
                      Hi team,
we have a large-scale application in use that sends bulk emails to thousands of users. We adhere to all standard guidelines and protocols, and our email addresses are whitelisted to ensure they are not considered spam.
Our users create email alerts on our platform and receive notifications on their respective email addresses. These communications are not unknown, spam, or unsolicited marketing. To maintain trust with our users, we provide an unsubscribe feature as per RFC2369-compliant.
We have added list unsubscribe headers with mailTo implementation and sent it to outlook/gmail accounts. However, when unsubscribed, the email seems to be having the encoded characters as is. Whereas the same is working fine in other email clients without any encodings.
The headers were implemented according to the List-Unsubscribe headers as specified in the IETF RFC and our emails are purely transactional in nature.
This is a critical issue for a large organization like ours and while it works properly on Gmail web and mobile, it is essential for us to check with Apple Mail client as well. This situation undermines our commitment to user trust and compliance.
Can anybody assist me why the encoding is showing up?
Would like to know whats the process involved to enable the unsubscribe button in Apple mail client application?
                    
                  
                
                    
                      I would like to create a MailKit extension that will allow me to manage my existing messages. I would like to move them around form folder to folder and reqad and update their headers to store some metadata that will be used by the extension.
Looking at the documentation for MailKit suggests that I can only implement 4 types of handlers (content blocker, action handler, compose handler and security handler). I can’t see anything in the docs about being able to get a list of messages in the inbox and manipulate them.
Am I missing something?
I’d love to hear from someone who knows more about this topic before I get into a dead-end rabbit hole.
cheers,
-tomek