I posted this in answer to one of the questions on this website so I’m also posting it here in Code Sharing so more people can find it.
I’ve seen people looking for a way to send email from the command line without using Mail.app. I wrote this python script a while back and thought you might find it useful. You can use this from applescript with the “do shell script” command. It’s for sending text email and has smtp support. Note that the python script requires 8 parameters. You can get the script from my website here: http://www.hamsoftengineering.com/codeSharing/pythonEmail/pythonEmail.html