Difference between revisions of "Smtp certs"
Jump to navigation
Jump to search
(Created page with "``` import smtplib, ssl port = 587 smtp_server = "smtp-na1.towerswatson.com" context = ssl.create_default_context() with smtplib.SMTP(smtp_server, port) as server: server....") |
|||
Line 2: | Line 2: | ||
import smtplib, ssl | import smtplib, ssl | ||
port = 587 | port = 587 | ||
− | smtp_server = " | + | smtp_server = "foo.example" |
context = ssl.create_default_context() | context = ssl.create_default_context() | ||
with smtplib.SMTP(smtp_server, port) as server: | with smtplib.SMTP(smtp_server, port) as server: |
Revision as of 21:27, 9 May 2022
import smtplib, ssl port = 587 smtp_server = "foo.example" context = ssl.create_default_context() with smtplib.SMTP(smtp_server, port) as server: server.ehlo() server.starttls(context=context) server.ehlo()