• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Taking mail.app 'offline'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Taking mail.app 'offline'


  • Subject: Taking mail.app 'offline'
  • From: martin <email@hidden>
  • Date: Mon, 11 Jul 2005 08:14:16 -0700

I don't find anything in the mail dictionary re taking mail 'offline' - just terms to make an account inactive. Can someone provide some terminology that will permit me to take mail 'offline' and then back 'online' that I can include in my 'move aged messages to trash' script? (My mail.app has two active accounts.)

set deleteboxes to {"applescript", "clayart", "woodfire", "bamboo", "drugwar", "marxism", "lbo-talk", "maclst", "xlist", "nettime"}
tell application "Mail"
set localMailboxes to every mailbox
if ((count of localMailboxes) is greater than 0) then
repeat with thismbox in localMailboxes
if name of thismbox is in deleteboxes then
my deleteoldmessages(thismbox)
end if
end repeat
end if
end tell



on deleteoldmessages(mboxname)

    tell application "Mail"
        set deletedate to (current date) - 2 * days
        set thislistmsgs to every message of mboxname

        repeat with thismsg in thislistmsgs
            try
                if date sent of thismsg is less than deletedate then
                     set mailbox of thismsg to mailbox "Trash"
                end if
            on error
           end try
        end repeat
    end tell
end deleteoldmessages
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Taking mail.app 'offline'
      • From: Tom Robinson <email@hidden>
  • Prev by Date: Re: Drag and drop into a window
  • Next by Date: Close a Window in TextEdit without saving the changes
  • Previous by thread: Re: if not (exists folder .......
  • Next by thread: Re: Taking mail.app 'offline'
  • Index(es):
    • Date
    • Thread