The email sending code works fine without problems, but it prints all of it in the message field. I've basically tried everything the last 3 hours. Any advice guys?
import smtplib
fromaddr="xxxxx@xxx.com"
toaddr="xxxxx@xxxx.com"
message = '''\\
... From: xxxxx
... Subject: testin'...
...
... This is a test '''
password="xxxx"
subject="this is supposed to be the subject"
server=smtplib.SMTP('smtp.gmail.com:587')
server.starttls()
server.login(fromaddr,password)
server.sendmail(fromaddr,toaddr,message,subject)
server.quit()
subject = "this is supposed to be the subject"