Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added mailArchive source, script and app

  • Loading branch information...
commit 853b92e74d8180dcce91aad4f93237b7d79c5437 1 parent 024721a
Rob Lacey authored
44 mailArchive.app/Contents/Info.plist
View
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleAllowMixedLocalizations</key>
+ <true/>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>applet</string>
+ <key>CFBundleIconFile</key>
+ <string>applet</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>mailArchive</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>aplt</string>
+ <key>LSMinimumSystemVersionByArchitecture</key>
+ <dict>
+ <key>x86_64</key>
+ <string>10.6</string>
+ </dict>
+ <key>LSRequiresCarbon</key>
+ <true/>
+ <key>WindowState</key>
+ <dict>
+ <key>dividerCollapsed</key>
+ <false/>
+ <key>eventLogLevel</key>
+ <integer>-1</integer>
+ <key>name</key>
+ <string>ScriptWindowState</string>
+ <key>positionOfDivider</key>
+ <real>329</real>
+ <key>savedFrame</key>
+ <string>227 141 715 737 0 0 1280 878 </string>
+ <key>selectedTabView</key>
+ <string>result</string>
+ </dict>
+</dict>
+</plist>
BIN  mailArchive.app/Contents/MacOS/applet
View
Binary file not shown
1  mailArchive.app/Contents/PkgInfo
View
@@ -0,0 +1 @@
+APPLaplt
BIN  mailArchive.app/Contents/Resources/Scripts/main.scpt
View
Binary file not shown
BIN  mailArchive.app/Contents/Resources/applet.icns
View
Binary file not shown
BIN  mailArchive.app/Contents/Resources/applet.rsrc
View
Binary file not shown
4 mailArchive.app/Contents/Resources/description.rtfd/TXT.rtf
View
@@ -0,0 +1,4 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
+{\fonttbl}
+{\colortbl;\red255\green255\blue255;}
+}
22 mailArchive.applescript
View
@@ -0,0 +1,22 @@
+set theAccounts to {"PledgeMusic"}
+set theMailboxes to {"INBOX", "Sent Messages"}
+
+tell application "Mail"
+ repeat with theAccount in theAccounts
+ display dialog theAccount
+ repeat with theMailbox in theMailboxes
+ set oldMessages to ((every message of mailbox theMailbox of account theAccount) whose (date sent < (current date) - 365 * days))
+ if (count oldMessages) is greater than 0 then
+ set theAccountArchive to (theAccount & "Archive")
+ display dialog "Archiving " & (count oldMessages) & " messages."
+ if not (exists mailbox theAccountArchive) then
+ make new mailbox with properties {name:theAccountArchive}
+ end if
+ if not (exists mailbox theMailbox of mailbox theAccountArchive) then
+ make new mailbox with properties {name:(theAccountArchive & "/" & theMailbox)}
+ end if
+ move oldMessages to mailbox theMailbox of mailbox theAccountArchive
+ end if
+ end repeat
+ end repeat
+end tell
BIN  mailArchive.scpt
View
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.