| From: Jim Correia | Date Sent: 2007-01-10 13:46:38 |
| Subject: How to send selected items as attachments with Mailsmith | To: Yojimbo Talk |
The question of how to email an item has come up before. Here is an
example script which will email the selected items as attachments
using Mailsmith. Save to your scripts folder and invoke with the
system wide script menu, or your favorite utility (e.g. Fast Scripts.)
- Jim
--begin script--
(*
Creates a new outgoing message with the selected Yojimbo items
attached.
Mailsmith version
*)
tell application "Yojimbo"
set _targets to (selected items of browser window 1)
set _exportLocation to my getExportLocation()
set _files to (export _targets to _exportLocation) as list
end tell
tell application "Mailsmith"
set _messageWindow to make new message window
tell _messageWindow
repeat with _f in _files
make new enclosure with properties {file:_f}
end repeat
end tell
activate
end tell
(* Mailsmith doesn't read the attached files until send/queue/save
draft time, so we export them to a fixed location which the user can
delete later. *)
on getExportLocation()
set EXPORT_FOLDER_NAME to "Exported Yojimbo Attachments"
tell application "Finder"
if not (exists folder EXPORT_FOLDER_NAME of desktop) then
make new folder at desktop with properties {name:EXPORT_FOLDER_NAME}
end if
set _exportLocation to folder EXPORT_FOLDER_NAME of desktop as alias
end tell
return _exportLocation
end getExportLocation
--
----------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <yojimbo-talk@[Protected]>.
To unsubscribe, send mail to: <yojimbo-talk-off@[Protected]>
List archives: <http://www.listsearch.com/yojimbotalk.lasso>
Have a feature request, or not sure if the software's working
correctly? Please send mail to: <support@[Protected]>