New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

AppleScripting Archiving to Finder of Mail Messages

Post Reply New Thread Subscribe

Thread Tools

Member Since: Jan 07, 2012
Location: Cheltenham UK
Posts: 1
Azteck is on a distinguished road
Mac Specs: Many and varied G3 - 2x Quadcore Xenon

Azteck is offline
I want to script Archiving of Mail Messages.
I am new to AppleScript but have 18 years experience of scripting FileMaker.
I have found scripts that enable one to archive the contents of a Mail folder but this is NOT what I want to do. (and the scripts are locked down as Applications so I can not extract code)
I have also found scripts that will enable to create a new Message and send it. Again NOT what I want to do.

Proposed WorkFlow
While in Mail: create and finish Message
Instead of clicking Send in Mail, I want to fire a script that:
Send the 'currently open' Message
Save the Message in Raw Message Source to a Finder Folder of my choice (ie: within my Finder files relating to a project (say))
Move the Message within Mail to a Folder called 'Delete in 6m' (say)

This workflow moves the decision making and archiving to the moment of message creation.

Other variants would:

While viewing an Inbox Message would:
Close Message
Save the Message in Raw Message Source to a Finder Folder of my choice
Move the Message within Mail to a Folder called 'Delete in 6m' (say)
(this could be the same script as above with an IF test that checks some property such as who the recipients are)


Move the Message within Mail to a Folder called 'Delete in 6m' (say)

I can not find a way of:
Q1 sending the 'currently open' message
Q2 saving the 'currently open' message to a Finder folder
Q3 addressing the 'currently open' message in any way
Q4 any idea on a suitable IF test that will be reliable (considering that I use several accounts and an outgoing e-mail could contain one of my e-mail addresses as a recipient.)

I am sure that AppleScript is the tool to use, but have to say that it is impenetrable for a newcomer. (Quite unlike FileMaker)
Q5 Can anyone recommend a book or tutorial for someone with years of programming experience but who has not got a clue about the library of instructions available OR the syntax for these instructions.

This is an enquiry for my own use.

PowerBook G4 running OS 10.4.11
Mail 2.1.3
AppleScript Editor 2.1.2

Also MacPro 2xquad core - but everything has to work on the PowerBook

Happy New Year to all

Best wishes
Nic Williamson
QUOTE Thanks

Post Reply New Thread Subscribe

« iTunes Applescript copy to NAS | Is there an easy way to write iphone/mac apps ? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
mail keeps bring back old messages mattyhodge OS X - Operating System 1 03-10-2011 04:18 PM
Mail client deleted messages on server retrieval ceciliaxw OS X - Apps and Games 1 01-28-2010 05:38 PM
phantom mail messages johnlea70 OS X - Apps and Games 0 01-16-2008 06:35 AM
Mail downloading all messages using POP Gmail Sesro1978 OS X - Apps and Games 1 01-15-2008 08:45 PM
Mail Folder "exclusively locked" by user klippe OS X - Apps and Games 3 09-06-2005 07:20 PM

All times are GMT -4. The time now is 04:36 AM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?