How to set the sender of the current Mail.app outg

2019-02-05 05:20发布

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?

7条回答
时光不老,我们不散
2楼-- · 2019-02-05 05:52

Actually you can set the sender of an outgoing message as described here: Incorrect sender when sending Email via Applescript

查看更多
登录 后发表回答