How to send an e-mail using Python?

Question

How to send an e-mail using Python?

Re: How to send an e-mail using Python?

>> import smtplib
>>> server = smtplib.SMTP('localhost')
>>> server.sendmail('example@test.org', 'name@domain.com',
"""To: name@domain.com
From: example@test.org
Test e-mail.
""")
>>> server.quit()