pattulus
11/8/2011 - 9:43 PM

Get the message:// URL of the selected message in Mail.app

Get the message:// URL of the selected message in Mail.app

tell application "Mail"
	set selectedMsgs to selection
	repeat with theMsg in selectedMsgs
		set message_url to "message://%3c" & (the message id of theMsg) & "%3e"
		tell application "Finder"
			set the clipboard to message_url as text
		end tell
		exit repeat -- leave the repeat loop after one pass
	end repeat
end tell