如何在AppleScript中获取当天的邮件

时间:2015-08-11 20:03:51

标签: email applescript

如何在Apple脚本中获取当天的新邮件。我可以收到所有新邮件,但我想知道是否有可能在当天收到邮件?

这就是我所拥有的

tell application "Mail"
   check for new mail
   delay 1
set newMail to (messages of inbox whose read status is false)
end tell

由于

1 个答案:

答案 0 :(得分:0)

试试这个

tell (current date) to set midnight to it - (its time)
tell application "Mail"
    check for new mail
    delay 1
    set newMail to (messages of inbox whose date received comes after midnight)
end tell