OF2 Upgrade broke Apple mail script

I upgraded to the latest version (12/7) and now scripts I had to send emails from Apple mail to OF2 are not working. Anyone experience this? I also noticed that the script was “modified” at the same time (not by me).

I know this sounds cliché, but have you tried uninstalling and reinstalling the Clip-O-Tron?

1 Like

Yes, I’m having trouble with a couple of my Mail to OmniFocus scripts, strangely coincident to the latest update.

These are scripts I’ve developed, and have been working without issue, until the last few days. This is not (for me) an issue with clip-o-tron.

Although I was able to “script around it” (after quite a bit of trial & error), I’m wondering if something has changed with OmniFocus’ ability to access files that have been downloaded to the “Downloads” folder, which is where mail attachments have to land first (apparently), before they can be inserted/attached to a task.

Any help or guidance appreciated - thanks

Having chased this issue further since my last post, I’ve concluded (at least in my case) this is not an OmniFocus issue.

Note: my issue is with scripts that send mail messages & their respective attachments to OmniFocus.

Having done some online searching, I’ve come across some random posts suggesting this is a Mail.app issue, however the number of posts is not significant enough that I’ve come across any solutions.

I developed the following simple script that talks straight to Mail (& takes OmniFocus out of the equation). In my case what I’m finding is this occurs with many (but not all) attachments.

Here is my test - Select a message in Mail known to contain attachments. Switch to the AppleScript Editor and run this script;

tell application “Mail”
set theMessages to the selection
repeat with eachMessage in theMessages
return name of mail attachments of eachMessage
end repeat
end tell

If successful this will return the display names of the attached files (ex: {“UPS Charges0001.pdf”})

If not successful this will return error “Mail got an error: AppleEvent handler failed.” number -10000

As I mentioned, this does not happen with all attachments, however so far I have not been able to determine the root cause.

All other Mail elements (ex: recipient, subject, etc.) are addressable - only effecting attachments.

Any thoughts appreciated