Read the rest of the article for the script...
#! /usr/bin/perl
$address = $ARGV[0];
if (! $address) {
print "usage - mail email\@mac.com\n";
exit;
}
$SCRIPT =<<EOS;
tell application "Mail"
activate
set mailversion to version as string
set composeMessage to (a reference to (make new compose message at beginning of compose messages))
tell composeMessage
make new to recipient at beginning of to recipients with properties {address:"$address"}
end tell
set messageEditor to make new message editor at beginning of message editors
(* the following is a work around for a bug fixed in later
versions of the Mail application that was present in versions
1.0 and 1.1. *)
if mailversion is "1.0" or mailversion is "1.1" then
set compose message of last message editor to composeMessage
else
set compose message of first message editor to composeMessage
end if
end tell
EOS
open (FH, "|/usr/bin/osascript");
print FH $SCRIPT;
close FH;

