Create Button-Action in Mail

I’m looking for a way to add a button to Mail, that would move the selected message to another folder. Is that possible?

It won’t add a button, but you could use Mail Act-On - http://www.indev.ca/MailActOn.html - to run this with a couple of user defined keystrokes.


using terms from application "Mail"
	on perform mail action with messages theMessages for rule theRule
		
		tell application "Mail"
			move theMessages to mailbox "MailboxNameHere"
		end tell
		
	end perform mail action with messages
end using terms from

Edited to add link

Thanks, that works perfectly!