Код: Выделить всё
import smtplib, ssl
email = "fromemailhere"
password = "passwordhere"
receiver = "toemailhere"
message = """
Hello World
"""
port = 465
sslcontext = ssl.create_default_context()
connection = smtplib.SMTP_SSL(
"smtp.gmail.com",
port,
context=sslcontext
)
connection.login(email, password)
connection.sendmail(email, receiver, message)
print("sent")
Я не разработчик Python, но хочу использовать эту программу.
Подробнее здесь: https://stackoverflow.com/questions/746 ... d-via-smtp
Мобильная версия