我希望编写一份AppleScript脚本,用于设置邮件应用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}
,而不是我期望的“传出消息”对象。
有什么想法吗?