Here's the AppleScript code to create a new email:
set theSubject to your_subject_variable_here set theContent to your_content_here tell application "Mail" activate set newMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true} end tell
Caveats:
I've never tested it with multiline content (it was part of a script that automatically created the content)
If you have any problems with new lines, the way to insert a linebreak in AppleScript is:
set multiline to "foo" & return & "bar" & "baz"
Play a little bit with this ('man osascript' for info on how to call AppleScript from the command line) and tell me how it works. It looks like a nice addition to the TextMate arsenal :)
Hope it helps
-- Ale Muñoz http://sofanaranja.com http://appleweblog.com