I'd like to write an AppleScript to set the sender of the current outgoing message in Apple's Mail.app.
I've tried this:
tell application "Mail" to set sender of front outgoing message to "<my email address>"
but I get the error message error "Mail got an error: Can’t set sender of item to any." number -10006 from sender of item to any
which doesn't make sense to me.
When I try to interrogate the front outgoing message as follows:
tell application "Mail" to get properties of front outgoing message
I get {class:item}
in return, instead of an "outgoing message" object like I'd expect.
Any ideas?
Actually you can set the sender of an outgoing message as described here: Incorrect sender when sending Email via Applescript