From fc521804970116ace87b186e1c17fa872d4086d6 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 29 Oct 2020 13:02:00 -0500 Subject: [PATCH] change mail to localmail --- mail.py | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/mail.py b/mail.py index 551d0bf..659ed9b 100644 --- a/mail.py +++ b/mail.py @@ -1,19 +1,13 @@ -import smtplib, ssl +import smtplib -port = 465 # For SSL -password = "mailR3L4Y" +port = 25 -# Create a secure SSL context -context = ssl.create_default_context() +server=smtplib.SMTP("localhost", port) +sender_email = "pope@home.kawomi.com" +receiver_email = "pope@kawomi.com" +message = """\ +Subject: Hi there -with smtplib.SMTP_SSL("kawomi.com", port, context=context) as server: - server.login("pope@kawomi.com", password) +This message is sent from Python.""" - sender_email = "pope@kawomi.com" - receiver_email = "j.tretter@gmail.com" - message = """\ - Subject: Hi there - - This message is sent from Python.""" - - server.sendmail(sender_email, receiver_email, message) \ No newline at end of file +server.sendmail(sender_email, receiver_email, message)