Send an email directly to a fix address in background (Mail)
Posted: Thu Feb 12, 2009 12:37 am
I use this script to send my wife quick notes.
(Would be cool if the script would be more flexible when it comes to the recipient. But unlike Quicksilver there is no "third window" in LaunchBar. Should be possilble though ...)
You have to edit this script for your purpose (address and greeting/last line)
Give it a name and save it in "~/Library/Application Support/LaunchBar/Actions"
(Would be cool if the script would be more flexible when it comes to the recipient. But unlike Quicksilver there is no "third window" in LaunchBar. Should be possilble though ...)
You have to edit this script for your purpose (address and greeting/last line)
Give it a name and save it in "~/Library/Application Support/LaunchBar/Actions"
Code: Select all
---------------------------------------------------------
-- This scripts lets you write a message in LaunchBar and send it in the background to a fix address
--
-- http://www.mactipper.com/2008/12/applescript-to-send-screenshot.html
-- http://www.macosxhints.com/article.php?story=2005030715313097
--
-- modified by @ptujec for LaunchBar
---------------------------------------------------------
on handle_string(message)
-- the recipients address
set the_address to "example@example.com"
-- inserts the message typed in LaunchBar to email subject
set the_subject to message
-- inserts the message typed in LaunchBar to the email body
-- and adds a greeting at the end like i.g. "Best Regards, ..."
set the_body to message & "\n\n" & "Best Regards, ..."
tell application "Mail"
set new_message to make new outgoing message with properties {visible:false, subject:the_subject, content:the_body}
set MessageFont to message font
set MessageFontSize to message font size
tell new_message
make new to recipient at end of to recipients with properties {address:the_address}
set font of content to MessageFont
set size of content to MessageFontSize
end tell
send new_message
end tell
end handle_string