Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
executable file 33 lines (26 sloc) 814 Bytes
on run argv
if argv is {} then
return "Pass at least one filename as an argument!"
end if
set pwd to system attribute "PWD"
tell application "Mail"
-- This only works for messages created by this script
set composeMessage to first outgoing message where visible is true
on error
set composeMessage to make new outgoing message at beginning with properties {visible:true}
end try
tell composeMessage
repeat with fileName in argv
if not fileName starts with "/" then
set fileName to pwd & "/" & fileName
end if
tell content
make new attachment with properties {file name: fileName} at after the last paragraph
end tell
end repeat
end tell
end tell
end run
Jump to Line
Something went wrong with that request. Please try again.