from email.MIMEText import MIMETextmessage = """Hello,-- Anonymous"""msg = MIMEText(message)msg['To'] = 'recipient@example.com'msg['From'] = 'Test Sender 'msg['Subject'] = 'Test Message'print msg.as_string()