how to send email in python
<pre><code>import smtplib

SERVER = "localhost"

FROM = "sender@example.com"
TO = ["user@example.com"]

SUBJECT = "Hello!"

TEXT = "This message was sent with Python's smtplib."
server = smtplib.SMTP(SERVER)
server.sendmail(FROM, TO, message)
server.quit()
</code></pre>

<p>This is giving the error:</p>

<pre><code>'**The debugged program raised the exception unhandled AttributeError
"'module' object has no attribute 'SMTP'"
File: /home/an/Desktop/email.py, Line: 13**'
</code></pre>
