Теперь Кью работает в режиме чтения

Мы сохранили весь контент, но добавить что-то новое уже нельзя

Как сделать отправку сообщений в питон через smtp?

Короче есть программа туда с помощью input и некоторых переменных будут выводиться и сохраняться данные. Потом эти данные нужно отправить на мой емаил. Как это организовать??
ПрограммированиеPython+1
Nikita Kovalchuk
  ·   · 6,8 K
Я очень рад быть частью этой группы и надеюсь...  · 7 янв 2023
import smtplib

# Get the email and password from the user
email = input("Enter your email: ")
password = input("Enter your password: ")

# Get the recipient's email and the subject and body of the email
to_email = input("Enter the recipient's email: ")
subject = input("Enter the subject of the email: ")
body = input("Enter the body of the email: ")

# Set up the SMTP server
server = smtplib.SMTP('smtp.example.com', 587)
server.starttls()
server.login(email, password)

# Send the email
msg = f'Subject: {subject}\n\n{body}'
server.sendmail(email, to_email, msg)

# Disconnect from the server
server.quit()
Python Middle Developer   · 23 мая 2022  · happypython.ru
import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText server = smtplib.SMTP(host='host_address',port=your_port) msg = MIMEMultipart() message = "Hi Yandex Q" # параметры сообщения... Читать далее
Паблик помощи новичкам в Python (пишем парсеры с фриланс заказов)Перейти на happypython.ru