Jim Correia How to send selected items as attachments with Mailsmith
Jan 10, 2007; 13:46
Jim Correia
How to send selected items as attachments with Mailsmith
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@barebones.com>. To unsubscribe, send mail to: <yojimbo-talk-off@barebones.com> 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@barebones.com>
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!