Use STARTTLS to send mail
This commit is contained in:
parent
b308fe4669
commit
fb18e25e90
1 changed files with 1 additions and 0 deletions
1
check.py
1
check.py
|
@ -106,6 +106,7 @@ running for nemunaire@nemunai.re""")
|
||||||
|
|
||||||
import smtplib
|
import smtplib
|
||||||
with smtplib.SMTP("localhost") as smtp:
|
with smtplib.SMTP("localhost") as smtp:
|
||||||
|
smtp.starttls()
|
||||||
if SEND_TO_REALUSER:
|
if SEND_TO_REALUSER:
|
||||||
smtp.send_message(msg)
|
smtp.send_message(msg)
|
||||||
smtp.send_message(msg, to_addrs=["virli-report@nemunai.re"])
|
smtp.send_message(msg, to_addrs=["virli-report@nemunai.re"])
|
||||||
|
|
Reference in a new issue