Jump to content

Filtering Messages into folders in Mail.app


Recommended Posts

Hey Guys I wonder if anyone can help me.

 

I get a ton of email each day from Amazon, eBay and Paypal for my job and would like a workflow so I can just press on F Key to file emails to a folder.

 

 

Kind Regards,
 
Chris Humphreys
Head Of Online + R&D
BestValueStockOnline.com

 

Chris, 

Sorry it took a bit to get back to you. The post kinda got lost in the weeds when I was going through them all.  Anyway, something like this could probably be done but its going to take a little bit of AppleScript to achieve it. The only way that I can think of right off to do this is to mimic selecting the Message menu item, choosing Move To, and it picking a folder using Applescript.

tell application "Mail"
	activate
	set selectedMessages to selection
	set theMessage to item 1 of selectedMessages
	
	tell application "System Events"
		tell process "Mail"
			click menu item "Saved" of menu "Move To" of menu item "Move To" of menu "Message" of menu bar 1
		end tell
	end tell
	
end tell

 

This kind of a start of what I came up with. It only moves 1 selected message to a specified folder. This code will... activate Mail (if it isn't already), grab the list of all selected messages, take the first one, and then move it to a folder called "Saved". This would be the same thing as selecting that message and then clicking.. Message->Move To->Saved, or right clicking and doing the same thing. This code could be slightly modified to loop through all messages. You would have to code in your own folder as well.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...