lib/waddup/sources/apple_mail/sent_mail.applescript in waddup-0.2.1 vs lib/waddup/sources/apple_mail/sent_mail.applescript in waddup-0.2.2

- old
+ new

@@ -3,21 +3,12 @@ set window_to to date (item 2 of argv) tell application "Mail" set results to {} - repeat with acct in every account - set username to user name of acct - try - set mbox to mailbox "[Gmail]/All Mail" of acct - on error - set mbox to mailbox "Sent" of acct - end try - - set msgs to (messages whose sender contains username and date sent >= window_from and date sent <= window_to) in mbox - repeat with msg in msgs - set the end of results to {subject:subject of msg, datetime:date sent of msg as string} - end repeat + set msgs to (messages of sent mailbox whose date sent >= window_from and date sent <= window_to) + repeat with msg in msgs + set the end of results to {subject:subject of msg, datetime:date sent of msg as string} end repeat results end tell end run