email - Python : sending mail through gmail issue -
I'm trying to send an email (via Gmail) using a Python script that someone once Written on this site, but I am getting an error: Unicodecode error: 'utf8' can not decode byte 0xe8 in codec condition 2: invalid continuity byte script: import imported smtplib email.mime text import MIMEText # mail setup FROMMAIL = "xxx@gmail.com" LOGIN = FROMMAIL PASSWORD = "yyy" SUBJECT = "test topic" TOMAIL = "x Xx@gmail.com "msg = MIMEText ('testcontent') msg [subject] '=' test 'msg [from'] = FoMMM msg ['to'] = tommail server = smartplay MTP ('smtp.gmail.com', 587) server.set_developleval (1) server.hello () server.starttls () server.login (login, password) server.sendmail (FROMMAIL, [TOMAIL], msg.as_string (): Server.quit () stacktrace: traceback (most recent call final): File "C: \ user \ Xxx \ desktop \ test.py ", line 11, server = smtplib.SMTP ('smtp.gmail.com', 587) file...