New Apple Mail with Ventura

Thank you so much for showing me this!

Just documenting this for anyone else looking.

I couldn’t get either MacSparky’s script or The Sweet Setup’s script to work in Alfred 5. I am not a coder and am basically just mashing buttons, but I vaguely recall a lot of chatter about Python and Alfred and assume it’s related to the fact both scripts reference Python? (Or I am way off piste and skewered on a tree.) Both codes trigger but don’t return a value.

ANYWAY. The Daring Fireballs script, which does not reference Python, does work in Alfred. The script is:

tell application "Mail"
    set _sel to get selection
    set _links to {}
    repeat with _msg in _sel
        set _messageURL to "message://%3c" & _msg's message id & "%3e"
        set end of _links to _messageURL
    end repeat
    set AppleScript's text item delimiters to return
    set the clipboard to (_links as string)
end tell

I created a workflow in Alfred with a hotkey as a trigger (this hotkey is tied only to Mail app so there’s no conflict):

Copy email URL

The script copies a message URL to clipboard, which you can then paste where you like.

I started tinkering to make it return a Markdown URL with the subject line as the title, but I couldn’t get it to work and I decided that was a “nice to have” rather than essential so I am moving on with my life!

Things 3 has a quick entry task add dialog that opens with a single key combo. If Mail is open it can grab the link automatically. It also presents it as plain text so I sometimes use it then copy the link to another app (e.g. Bear notes)

To add on to my previous point, I think spam filtering has gotten worse, not better. For the past 2 weeks I’ve been getting tons of spam. Like blocks of six messages, two or three times a day, coming from the same random.reg.ru address. Every time I mark those as spam, yet new messages are never moved there. I finally broke down and created a server side rule, hopefully it works. And to top it off, two emails from Apple (receipt and price increase announcement) were marked as spam!

I get round this by creating a rule such that any domain ending in .ru is filtered to junk. There is no circumstance where I’ll need an email ending in .ru. I do the same with some company domains, e.g., @xyz.com. I’ve been doing this for about two years.

This doesn’t end all spam of course but I seldom get more than 3-5 spam emails in my inbox a week. But, if I go to my spam/junk folders I have hundreds!

I admit I get a certain satisfaction in seeing all of that spam filtered away. :smiling_imp:

I’ll add, based on this thread, that I create all my rules server side so they function across devices.

1 Like

I did that, but I don’t think I got the syntax correct. Afternoon spam blast can’t back today. I might have to move the rule up the chain.

1 Like