我有以下由 Mail.app 规则触发的 AppleScript:
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
repeat with msg in theMessages
set theText to subject of msg & return & content of msg & date sent of msg
display dialog (theText)
end repeat
end perform mail action with messages
end using terms from
如果我选择一条消息,请右键单击并选择“应用规则”它可以正常工作。但是,如果脚本是由传入的消息触发的,则消息中似乎有一条随机消息。
我如何获得正确的信息?
我正在使用带有 Mail 11.2 的 High Sierra。