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

How to get mail of current day in AppleScript

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

这是我的

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

谢谢

试试这个

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