I am making a script to send emails with python and this bug is making me go mad! Any help would be awesome.
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
email = '******@gmail.com'
password = '*******'
send_to_email = '****.net'
subject = '********
'
message = '*******'
msg = MIMEMultipart
the alert is about these next three lines about the ['From'], ['To'], ['Subject']
msg['From'] = email
msg['To'] = send_to_email
msg['Subject'] = subject
msg.attach(MIMEText (message, 'plain'))
server = smtplib.STMP('smtp.gmail.com', 587)
server.starttls()
server.login(email, password)
text = msg.as_string()
server.sendmail(email, send_to_email, text)
server.quit()