How can I control Mail Message background color from Applescript?
In Mail, if you use the built-in Rules, you can change a messages "background color" to "other" and provide any value you want using Rules. In the Rules you select a color from the color wheel to define "other".
Using Applescript to drive Mail, you can change the background color using:
background color (blue/gray/green/none/orange/other/purple/red/yellow) : The background color of the message
Which seems straightforward and works with the predefined colors. But I'm having difficulty with setting a custom color using "other"
For example
set background color of msg to other
generates an error
And other is a constant that can't be changed.
set other to "#FF0000"
Can’t set «constant qqclccot» to "#FF0000". Access not allowed.
So maybe it's a hash key??
Trying various list formats also fails (other:"#ff0000"), {other:"#ff0000"}, etc.
What I'm looking for is something like:
set background color of msg to other:"#ffff00"
or
set background color of msg to "#ffff00"
Does anyone know how to assign a custom background color from Applescript to a message in Mail?
MacBook Pro