Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Fully automated, one-step sending of a URL from Safari' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Fully automated, one-step sending of a URL from Safari
Authored by: mark hunte on Feb 22, '08 10:21:57AM
Command Shift + I, does not send the email automatically. Which is what I think was the real intent here.

That being the case, then I would not want to go to mail.app, but stay in Safari,

Here is a slightly cleaned up version.

tell application "Safari"
	set thisPage to URL of document 1
	set theSubject to name of document 1
end tell
tell application "Mail"
	set theAddress to "Friends@mac.com"
	set theBody to "Hey, I thought you would be interested in this link:
" & thisPage
	tell application "Mail"
		set newMessage to make new outgoing message with properties {subject:theSubject, content:theBody & return & return}
		set message signature of newMessage to signature "Cheers" -- Cheers being the name of an existing signature  already set up in Mail...
		tell newMessage
			set visible to false
			set sender to "yourFromMailAddress@mac.com"
			make new to recipient at end of to recipients with properties {address:theAddress}
			send
		end tell
	end tell
end tell
If you have more than one friend :-D , setting up a name selection should not be that hard.

---
mh

[ # ]