Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Toggle viewing images in Mail.app via Applescript Apps
Usually I leave HTML/images disabled in Mail.app. But sometimes I'd like the ability to enable them for one particular email, then disable it again. It was a bit of a pain to dig through the preferences each time this happened.

Applescript to the rescue!

tell application "Mail"
  set currentState to download html attachments
  if currentState = false then
    set newState to true
  else
    set newState to false
  end if
    
  set download html attachments to newState
  display dialog ¬
   "Download HTML attachments set to \"" & ¬
   newState & "\"." buttons {"OK"}
 
end tell
Pretty simple, but useful!
    •    
  • Currently 2.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[5,922 views]  

Toggle viewing images in Mail.app via Applescript | 8 comments | Create New Account
Click here to return to the 'Toggle viewing images in Mail.app via Applescript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Toggle viewing images in Mail.app via Applescript
Authored by: bax on Oct 23, '03 10:52:28AM

It gets even better. In case you're going to compile Altivec
code, the precompiled headers do not cover the nessesary
flag by default.

sudo fixPrecomps -precompFlags -faltivec

would help here.

--Bax



[ Reply to This | # ]
Toggle viewing images in Mail.app via Applescript
Authored by: bax on Oct 23, '03 10:53:53AM

hups, clicked on the wrong "comment" button. Sorry about that.



[ Reply to This | # ]
Similar hint already posted?
Authored by: nathanst on Oct 23, '03 11:40:09AM
Not to be rude, but is this hint much different than this one already posted?

[ Reply to This | # ]
Similar hint already posted?
Authored by: nvdingo on Oct 23, '03 12:01:47PM

yeah, same hint as the one i posted awhile ago.
the applescript in this one is a little more evolved, and toggles the state, instead automatically switching it on then off.

again, if you prefer the behavior of this one, you could stick it in a macro for any one of the excellent macro tools, like quickkeys, iKey to name two.



[ Reply to This | # ]
Panther 10.3 solution
Authored by: paulio on Oct 23, '03 11:49:38AM

Panther's Mail.app has a little button on the top of a message that will download the graphics for that particular message.



[ Reply to This | # ]
Panther 10.3 solution
Authored by: cello on Oct 23, '03 02:50:47PM

yeah, that sounds great!! So I don't do the work implementing the applescript (which is great by the way!), but prefer waiting for panther! thanks for the info!



[ Reply to This | # ]
Toggle viewing images in Mail.app via Applescript
Authored by: Angus on Oct 25, '03 02:55:06PM

Very cool. I've been looking for a way to do that in Entourage, to turn on "Allow network access when displaying complex HTML."

Most html messages I get are spam, but occasionally I get a legit one, like the TiVO newsletter, and I either have to change the prefs or redirect it to my .mac Mail account.



[ Reply to This | # ]
Toggle viewing images in Mail.app via Applescript
Authored by: the_webmaestro on Oct 28, '03 12:16:51PM

Can this be done via Applescript in Thunderbird/Mozilla? I'd also like to be able to switch my SMTP server like this (best way would be to cycle through each one, and have an alert indicating which is active when it's done!).

Thanks!

---
Father of Jeremy Logan Leeds



[ Reply to This | # ]