• 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
Re: Archiving Mailbox contents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Archiving Mailbox contents


  • Subject: Re: Archiving Mailbox contents
  • From: cricket <email@hidden>
  • Date: Mon, 24 Feb 2003 15:52:02 -0800

Well, since you asked:

- They asked about archiving email, not displaying it.
- The script is very simple, just verbose because the poster mentioned they were a newbie and this will help them learn applescript.
- Your approach will break if Mail changes its storage format
- Your approach will break if the user doesn't keep their email in ~/Library/Mail
- Your script works for one mailbox, mine works for all selected mailboxes
- The poster asked how to script Mail and rather than refuse to believe that Mail could be capable of even the most basic scripting. I looked, and behold, it does.

If the original poster hasn't been scared away by all the nonsense on this list, maybe they will become another productive applescript user.

- cricket

On Monday, February 24, 2003, at 15:34PM, John Delacour wrote:

No one seems to have given a good answer to this one, so here's something that may get you started. Here's a sample script that will archive the selected mailbox to a text file on your desktop, named after the selected mailbox:

Why go through all those thousands of Apple Events when the mailbox already exists as an archive and can be opened directly in a text editor with a single event?

set ed to " TextEdit "
set fldr to " ~/Library/Mail/" -- note the leading/trailing spaces!
set acct to "email@hidden"
do shell script "open -a " & ed & fldr & acct & "/INBOX.mbox/mbox"
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Archiving Mailbox contents
      • From: Jon Pugh <email@hidden>
References: 
 >Re: Archiving Mailbox contents (From: John Delacour <email@hidden>)

  • Prev by Date: Re: Modifying a .plist file
  • Next by Date: Re: Scripting Mail:get selection
  • Previous by thread: Re: Archiving Mailbox contents
  • Next by thread: Re: Archiving Mailbox contents
  • Index(es):
    • Date
    • Thread