I'll start you off, its up to you to finish it:
Code:
import sys, smtplib
#get info
from = raw_input("From: ")
to = string.splitfields(raw_input("To: "), ',')
print "Enter message, end with ^D:"
msg = ''
while 1:
line = sys.stdin.readline()
if not line:
break
msg = msg + line
#send
server = smtplib.SMTP('localhost')
server.sendmail(from, to, msg)
server.quit()