18

In the Mail setting (under Viewing) tab, there is a option Load remote content in messages which I unchecked, so for each email that contains remote content, I need to click the Load remote content button.

Is there anyway of a setting (probably not) or plugin that does this automatically for senders you would approve?

2

3 Answers 3

1

In macOS High Sierra, I do the following to automate the clicking of the Load Remote Content button in Mail.

Using an Automator Service with setting Service receives [no input] in [Mail] and a Run AppleScript action replacing the default code with the following example AppleScript code and setting a keyboard shortcut in System Preferences > Keyboard > Shortcuts > Services of ⇧⌃⌘L this works for me, however in other versions of macOS the example AppleScript code may need to be adjusted to click the target button.

tell application "System Events" to ¬
    tell application process "Mail" to ¬
        click button "Load Remote Content" of ¬
            group 1 of group 1 of scroll area 2 of ¬
            splitter group 1 of splitter group 1 of window 1

Note: I had to add Mail to System Preferences > Security & Privacy > Privacy > Accessibility for this to work.


Note: The example AppleScript code is just that and does not contain any error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted.

2
  • This isn't automatic, it's just a keyboard shortcut for the manual method.
    – Barmar
    Jun 8, 2021 at 22:47
  • This may not be an exact solution to the question, but it was helpful for what I wanted to do (load images via keyboard shortcut). Thanks!
    – George C
    Sep 26, 2021 at 23:50
0

The only (ugly) solution to date seems to be:

tell application "System Events"
    click at {x, y}
end tell

— where x and y are coordinates of the mouse over the button to simulate a click (You can easily find these coordinates by doing a screenshot, i.e. cmd+shift+4)

Note: This will only work for the first message in a conversation since the button will be at the right place.

Tip: Although a dirty workaround, I accept this compromise as I make it more user-friendly by launching the script via a three-finger click through BTT.

0

I believe user3439894 solution needs to be updated now to reflect the new button text:

tell application "System Events" to ¬
    tell application process "Mail" to ¬
        click button "Load Content Directly" of ¬
            group 1 of group 1 of scroll area 2 of ¬
            splitter group 1 of splitter group 1 of window 1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .