Toggle HTML parsing in Mail with a simple AppleScript
Fri, Feb 21 2003 at 10:17AM PST • Contributed by: nvdingo
Fri, Feb 21 2003 at 10:17AM PST • Contributed by: nvdingo
Since this hint was posted ("Add an HTML filter to catch more spam in Mail.app"), I turned off the download HTML images option in my Mail.app preferences.
But sometimes, I get HTML formatted mail from trusted sources that I want to see. I was getting tired of the round trip to the prefs to turn it on, let it download for viewing, and turning it back off. So I checked the AppleScript dictionary for Mail.app. The solution was incredibly simple. I created the following script and put it in my Scripts menu (which i had activated a long time ago):
I then remembered that I had downloaded and installed YoupiKey, so I pasted the script into a new shortcut, set it to cmd-shift-H, and am now very happy.
But sometimes, I get HTML formatted mail from trusted sources that I want to see. I was getting tired of the round trip to the prefs to turn it on, let it download for viewing, and turning it back off. So I checked the AppleScript dictionary for Mail.app. The solution was incredibly simple. I created the following script and put it in my Scripts menu (which i had activated a long time ago):
tell application "Mail" set download html attachments to true delay 2 set download html attachments to false end tellIt switches the pref, waits two seconds, and switches it back. Two seconds is long enough for it to download the HTML parts (or at least start) for the email you are currently viewing. Mail doesn't store the HTML parts, so if you switch messages and come back, you will be back to the blocked version.
I then remembered that I had downloaded and installed YoupiKey, so I pasted the script into a new shortcut, set it to cmd-shift-H, and am now very happy.
•
[9,001 views]
