Re: Archiving Mailbox contents
Re: Archiving Mailbox contents
- Subject: Re: Archiving Mailbox contents
- From: cricket <email@hidden>
- Date: Mon, 24 Feb 2003 14:29:14 -0800
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:
tell application "Finder" to set theHome to home as string
set theDesktop to theHome & "Desktop:"
tell application "Mail"
tell message viewer 1
set selectedMailboxes to selected mailboxes
repeat with eachMailbox in selectedMailboxes
set theName to name of eachMailbox
set thePath to theDesktop & theName
set theFile to open for access file thePath with write permission
set everyMessage to every message of eachMailbox
repeat with eachMessage in everyMessage
set theSource to source of eachMessage
write theSource as string to theFile starting at eof
end repeat
close access theFile
end repeat
end tell
end tell
- cricket
On Tuesday, February 04, 2003, at 17:00PM, JDB Science LLC wrote:
Does anyone have an Applescript for Mail.app that translates a
collection of messages in a mailbox into a single large plain text
file with the headers and message bodies concatenated together?
I would like to be able to archive the contents a selected mailbox so
that its contents can be viewed by a simple ASCII text editor. This is
meant to facilitate tracking of correspondence in a more robust, cross
platform manner.
I should perhaps emphasize that I need the source code for such an
AppleScript so that i can tweak the archive to suit the required style.
Thank you for any suggestions
_______________________________________________
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.