My all code :`
import smtplib
from email.mime.text import MIMEText
smtp_adresi="smtp.gmail.com"
smtp_port=587
user="****@gmail.com"
pass="*****"
gonderilecek_adresler=["****@bilalkocak.net","******@gmail.com"]
konu="Subject"
content="HTML content"
mail=MIMEText(content,"html","UTF-8")
mail["From"]=kullanıcı_adı
mail["Subject"]=konu
mail["To"]=",".join(gonderilecek_adresler)
mail=mail.as_string()
s=smtplib.SMTP(smtp_adresi,smtp_port)
s.starttls()
s.login(user,pass)
s.sendmail(user,gonderilecek_adresler,mail)
Result:
C:\Users\ASUS\AppData\Local\Programs\Python\Python36-32\python.exe "C:/Users/ASUS/PycharmProjects/Again/SMTP ile Mail/main.py" 'utf-8' codec can't decode byte 0xe7 in position 7: invalid continuation byte
Process finished with exit code 0
"utf - 8"why the spaces are needed? Try without them"utf-8"- omri_saadon# -*- coding: utf-8 -*-insert this in your first line. - omri_saadon\xe7is theçin your name but not encoded in UTF-8 (maybe cp1254, Turkish name?). Save your source file in UTF-8 and try again. It helps to have a reproducible example. Your******in the source probably removed the problem. - Mark Tolonen