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
You should probably modify your code to something like this:
from smtplib import SMTP as smtp
from email.mime.text import MIMEText as text
s = smtp(server)
s.login(, )
m = text(message)
m['Subject'] = 'Hello!'
m['From'] =
m['To'] =
s.sendmail(, , m.as_string())
Obviously, the <>
variables need to be actual string values, or valid variables, I just filled them in as place holders. This works for me when sending messages with subjects.