I have a lot of accounts in Mail. I use KeyboardMaestro to automate much of what I do, but I haven't found a way to reliably get it to choose a given account in a new message window. I'm wondering if I can get applescript to do it for me.
I have the following:
tell application "Mail" to make new outgoing message with properties {sender:"[email protected]"}
and Mail obediently opens a new message window...but doesn't bother to set the sender correctly :-(
I've also tried using the entire string which appears in the Sender popup menu in the window (which seems to be the Alias, in the Accounts pane of Mail's prefs window), plus just the substring before the hyphen (which seems to be the Full Name in Mail's prefs). Nothing works.
Has anyone managed to get this to work?