我想编写一个 AppleScript 来设置 Apple 的 Mail.app 中当前外发邮件的发件人。
我试过这个:
tell application "Mail" to set sender of front outgoing message to "<my email address>"
error "Mail got an error: Can’t set sender of item to any." number -10006 from sender of item to any
但我收到了对我来说没有意义的错误消息。
当我尝试如下询问前面的传出消息时:
tell application "Mail" to get properties of front outgoing message
我得到{class:item}
了回报,而不是我期望的“传出消息”对象。
有任何想法吗?