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)