Solution of sending mails in Python, Django or Flask.. SOLVED

40 views
Skip to first unread message

It's Aladdin

unread,
Jan 24, 2023, 11:51:47 PM1/24/23
to django...@googlegroups.com
import smtplib

my_email = "som...@gmail.com"
password = "sfuyyudfgyudgfydsg"

with smtplib.SMTP('smtp.gmail.com') as connection:
connection.starttls()
connection.login(user=my_email, password=password)
connection.sendmail(
from_addr=my_email,
to_addrs="someon...@gmail.com",
msg="Subject: Checking out automated mail in Python\n\nThis is
the mail body."
)
Reply all
Reply to author
Forward
0 new messages