As part of my routine, I review all outgoing emails once every week to see if any of them need to be flagged for follow-up. I want to try a different approach and instead of going through my Sent Mail, automatically send myself an email every week that lists all emails sent in the preceding week.
I wrote an AppleScript that does this, but it contains an inefficiency that I'd like to remove.
repeat with myMessage in items 1 through theHorizon of (get messages of myMailbox) if (currentDate - (date sent of myMessage)) div days is less than theTimeframe then
As my Sent Mail has tens of thousands of messages, I make the script only consider the first 350 messages (
theHorizon). This should be enough, but I don't really know. To confirm the message was indeed sent within the last 7 days, I run every message through an
What I would like, however, is for the
repeat statement to read something like this
repeat with myMessage in (get messages of myMailbox where date sent is less than 7 days ago)
This obviously doesn't work, I've tried a bunch of different formats but nothing seems to be working properly.