The recent hint to "Extend the power of 'open -a'� inspired me to write this quick hack to quit an application:
#!/bin/sh
echo | osascript <<EOF
tell application "$*"
quit
end tell
EOF
Call it quit, save it in your $PATH (I'm a fan of $HOME/bin), make it executable (chmod 755 quit), and then, for example, quit mail will do just that.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20040623231530448