I'm trying to write an Applescript (my first) to change the font of incoming emails using a rule in Mail.App. In particular, some tasteless individuals use Comic Sans, and I want to change their emails to Helvetica, thus saving my eyeballs.
I've added a rule to Mail.App which triggers the following Applescript on emails from these offenders. It works without error, but doesn't change the font. Any advice, please?
using terms from application "Mail" on perform mail action with messages theMessages for rule thisRule repeat with theMessage in theMessages tell theMessage try set font of content to "Helvetica" on error e number n my logit("OOPs: " & e & " " & n, "MailScript") end try end tell end repeat end perform mail action with messages end using terms from to logit(log_string, log_file) do shell script ¬ "echo `date '+%Y-%m-%d %T: '`\"" & log_string & ¬ "\" >> $HOME/log_" & log_file & ".log" end logit