I am successfully able to send email using the smtplib module. But when the emial is sent, it does not include the subject in the email sent.
import smtplib
Attach it as a header:
message = 'Subject: {}\n\n{}'.format(SUBJECT, TEXT)
and then:
server = smtplib.SMTP(SERVER) server.sendmail(FROM, TO, message) server.quit()
Also consider using standard Python module email - it will help you a lot while composing emails.