Sha256: 0b1fa0dca272c0f62dea653c674374ca5191a72f64dfa01da1d158aa8562a494

Contents?: true

Size: 678 Bytes

Versions: 3

Compression:

Stored size: 678 Bytes

Contents

on run argv
  set window_from to date (item 1 of argv)
  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
    end repeat

    results
  end tell
end run

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
waddup-0.2.1 lib/waddup/sources/apple_mail/sent_mail.applescript
waddup-0.2.0 lib/waddup/sources/apple_mail/sent_mail.applescript
waddup-0.1.0 lib/waddup/sources/apple_mail/sent_mail.applescript