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
try this:
import smtplib from email.mime.multipart import MIMEMultipart msg = MIMEMultipart() msg['From'] = 'sender_address' msg['To'] = 'reciver_address' msg['Subject'] = 'your_subject' server = smtplib.SMTP('localhost') server.sendmail('from_addr','to_addr',msg.as_string())