当我将一封电子邮件放在一个特定的邮件文件夹中进行培训时,是否可以通过更新规则来在邮件中使用苹果脚本对时事通讯进行排序?
发布于 2014-12-05 13:25:05
我不确定将邮件移动到另一个文件夹是否会触发附加到该文件夹的规则,但如果需要,也许可以手动触发此规则:
将其保存为新的邮件规则并将其连接到您的文件夹trainNewsletter,它应该获得电子邮件的sender
,并将其作为from is equal to
-rule条件添加到规则通讯中
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
repeat with thisMessage in theMessages
-- getting the sender of the email
set theSender to sender of thisMessage
-- setting the sender as a rule condition of rule "Newsletter"
tell rule "Newsletter"
make new rule condition with properties {header:"", expression:theSender, rule type:from header, qualifier:equal to value}
end tell
end repeat
end tell
end perform mail action with messages
end using terms from
享受,迈克尔/汉堡
https://stackoverflow.com/questions/27313168
复制相似问题